1.8.8 Store custom data on Entities

Discussion in 'Spigot Plugin Development' started by Doclic, May 1, 2021.

  1. Hey!
    I've been trying to store my own data on Entities using the NBTTagCompound class but when I tried to retrieve the data, it didn't work. So I checked the source code and noticed that it only adds to the NBTTagCompound data that it recognize.
    I used NBT because it was persistent even after reloads/restarts.
    If anyone could help, that would be greatly appreciated!
     
  2. If you use a newer version of spigot, you can also use PersistentDataContainer
     
    • Winner Winner x 1
  3. I know that but I prefer 1.8 PVP + a lot of people play in 1.8
     
  4. There are several API's you could use, if you want to stay on 1.8, such as https://github.com/tr7zw/Item-NBT-API.
     
  5. Hi, I need your help, I sent you a message on your profile. If you want, the pay will be high. Thank you again to you;)
     
    • Funny Funny x 1