Is it possible to change armor values?

Discussion in 'Spigot Plugin Development' started by iCodinqs, Apr 17, 2017.

  1. So I am wondering if its possible to change armor values.

    An example is let's say, leather armor is named "dirt armor", it should give the user (if they have full armor) 1 armor point. And the breaking point should be lower (25 hits?)

    Is there any way I could accomplish this?

    ~ Thanks
     
  2. NMS would know how but I don't do NMS. You can use Bukkit.dispatchCommand(CommandExecutor, String);
     
  3. I currently haven't bothered to explore the NMS, due to the fact that its way complex, since there's no JavaDocs(right?) for it.
    Though I have figured that it would have something to do with armor, know of anyone who has had experience with the NMS?
    ~ iCodinqs
     
  4. There is no real JavaDoc, but if you decompile Minecraft with the server with Mod Coder Pack, you will have a better insight.

    Also poke around CraftBukkit in Stash for some low level spigot/bukkit APIs
     
    • Informative Informative x 1
  5. This does not require hacking or patching NMS, all armor values can be changed per piece of armor with NBT tags, from (1.9? or 1.10)+
    If you are on some relic version, you cant do this without some really messy hacks or overriding all damage and doing your own calculations.
     
    • Informative Informative x 1
  6. Well, 1.11 will defo work, though I haven't touched the NBT tags yet. Would you mind giving me some persudo code to get a general overview of the system? Or at least how to use them :p
     
  7. I have no idea how to do it, just look up any tutorial for modifying item NBT (there may be a bukkit api for armor by now?).