1.15.2 ERROR NBTTagString

Discussion in 'Spigot Plugin Development' started by JamesAdams92150, Mar 27, 2020.

  1. I want to update my plugin for 1.15 but I have a problem and I don't know how to solve it

    [​IMG]
     
  2. What do not you understand here?
     
  3. That NBTTagString.a (String)

    you have a example ?
     
  4. You cannot use the constructor in order to create an NBTTagString. Instead, you will have to use the static Method NBTTagString.a(String), which basically acts as the constructor.
     
  5. I am really sorry to have disturbed you I had try her yesterday and on my IDE I had an error but it still works thank you :D
     
  6. SteelPhoenix

    Moderator

    What is your end goal? Looking at your code you are setting the author and a custom tag ('type').

    You can set the author by using BookMeta#setAuthor(String) and you can set custom tags using BookMeta#getPersistentDataContainer(). There is no reason to use nms in the snippet provided.
     
    • Agree Agree x 3