Anti crashchest: How to get NBT of a chest item

Discussion in 'Spigot Plugin Development' started by sinnlosername, Jun 27, 2016.

  1. Hey,

    Im trying to block crashchest. How can I get nbttags of the chest item? And how edit them? Any tutorial?

    Thanks an advance
     
  2. I have a nice library to accomplish either of those tasks. A link is in my signature and you can use the TagFactory.get ().getBlockIODelegate () to get a class with methods for reading and writing nbt to and from a blockstate. The process is very similar for items as well.

    Here is a link to the javasocs if you are interested http://mrblobman.github.io/NBTProxy/docs/

    If you just want to know how to do it without the library you can look at the source here for blockstate https://github.com/MrBlobman/NBTPro...b/mrblobman/nbt/v1_10_R1/TagFactory.java#L118 and here for items https://github.com/MrBlobman/NBTPro...ub/mrblobman/nbt/v1_10_R1/TagFactory.java#L42