Item Durability Control

Discussion in 'Archived: Plugin Requests' started by jonoce633, Oct 11, 2012.

  1. Offline

    jonoce633

    Hi! I was wondering if someone can make a plugin that can control an item/tools durability. One where you can set the durability of an item higher or lower than what it normally is.
     
  2. Offline

    Vandrake

    eheheh funny guy xD this is not possible. What one could do is do some calculations from the config relative to the default value. But it is so much trouble xD And I'm so busy
     
  3. Offline

    jonoce633

    Aww man :/
     
  4. Offline

    jonoce633

    What if the plugin can make a tool stay new longer. After a specified amount of uses, it begins to break down as usual?
     
  5. Offline

    Necrodoom

    if you want your durabillity bar to show as it is, i THINK you could check on playerinteractevent then run a random and check if to increase/lower metadata of the held tool.
     
  6. Offline

    zXCaKeXz

    A certain item, or every single damageable item?
    Oh and, I might work on this :3

    EDIT: I'll work on a config to configure which items to damage (* = all)

    https://dl.dropbox.com/u/94640527/Plugins/DurabilityController.jar

    - Configuration of items that will get affected by the plugin (* = all, seperated by commas)​
    e.g: 276, 277 - This allows dsword and dshovel to save durability​

    - Tool durability will be saved at a 20% chance, so technically, the tool durability is increased by 20%​

    PM me about any errors/bugs relating to this plugin

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  7. Offline

    jonoce633

    I don't understand code yet.

    Holy shit! That was fast.. :confused: Too fast... lol Thanks I'll check it out and let you know!

    Pretty much damageable items like weapons, tools and armor. Will * affect every single item in the game or only damageable weapons, tools and armor?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  8. Offline

    Cybermaxke

    Why would this not be possible? U can use reflection. ;)
     
  9. Offline

    jonoce633

    What's reflection?
     
  10. Offline

    Cybermaxke

    You are going to change values in other files, for this a field "durability" in the Item.class file

    I have made something like, now testing :)

    EDIT: Ok, only the durability bar is not following.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  11. Offline

    jonoce633

    Oh ok sick!
    I'll test it out for you if you want.
     
  12. Offline

    Cybermaxke

  13. Offline

    jonoce633

    Cybermaxke

    Awesome thanks! This is a good one! It gives the chance to have Gold better than Iron but worst than Diamond. Same with Chainmail.

    Oh yeah, you did forget one, Fishing rod lol

    Edit: The bar isn't synchronised with the actual duribility. Is it impossible to change that?
     
  14. Offline

    Cybermaxke

    I will do the ones I forgot tomorrow.
     
  15. Offline

    jonoce633

    Alright for sure.

    I think the enchantment unbreaking isn't working well with the plugin. After the item's bar has reached the least, it disappears but doesn't break and will reappear when you right-click a block or place a block in its slot in the inventory.
     
  16. Offline

    Cybermaxke

    Weird cause I only changed the values of durability, so I don't know why that is happening :/
     
  17. Offline

    jonoce633

    Weird. Still a usefull plugin though. As long as users don't have the enchantment unbreaking, they won't have this problem. Are you planning to post it on bukkit dev?
     
  18. Offline

    Cybermaxke

    I don't know, maybe. And maybe, I should have to update the plugin for 1.4

    Also, how is the saving working? Cause its just minecraft who is handeling that.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  19. Offline

    mmorton89

    Awesome plugin!

    I have been messing around with it and I can say that, at least on my server, the enchantments seem to work fine and the saving seems to be working as well.

    I don't know if you will be updating this, but I will check back. This is the only plugin I can find that can change item durability.
     
  20. Offline

    Cybermaxke

    Ok, nice to hear that its working fine, and it should be still working for v1.4.
    And what about the durability bar?
    :)
     
  21. Offline

    jonoce633

    The plugin works great but the durability bar isn't synchronized with the actual amount. Let's say we changed a wood axe's durability to 100 uses. The bar is still synchronized as if it was 59 uses but when the bar is empty, the wood axe keeps going until it is actually used 100 times. Then it'll break. With enchantment unbreaking, when the bar is empty, the item will disappear and reappear constantly. Other than that, the amount of uses works fine even with the enchantments.

    Edit: It's not working well with bukkit 1.4.2-R0.1 :(
    The same problem that happened with the enchantment unbreaking is now happening with all the tools even without the enchantment.
    Can you update it?
     
  22. Offline

    Cybermaxke

    I will try cause the methods were not changed in the update.
     
    sami102 and jonoce633 like this.
  23. Offline

    jonoce633

  24. Offline

    sami102

    So, you can update this for 1.4.2 and add it to Bukkit.dev, because i looking for plugin like this for very long...
     
  25. Offline

    Cybermaxke

    I will try to fix it, or I will recode it on a diffirent way ;)
    It should also work with the durability bar.

    What do u mean?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  26. Offline

    Retherz_

    Cybermaxke haha sorry forget it. But you want like /set itemdurability 20 for 20% or something like that?
     
  27. Offline

    Cybermaxke

    Its just a config were u can set the max durability of any item with it. ;)
     
  28. Offline

    mmorton89

    Cybermaxke

    So how is this plugin doing? I don't see any posts stating if you have fixed the durability bar or enchantments.
     
  29. Offline

    Cybermaxke

    Oh, sorry. Ye, I didn't get it working or I should add a enchantment effect. :/
     

Share This Page