Solved Play nbt file song

Discussion in 'Plugin Development' started by DevMax_Plg, Jun 17, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    KarimAKL

    @DevMax_Plg What Minecraft version are you building on?
     
  2. Offline

    DevMax_Plg

    version 1.9
     
  3. Offline

    KarimAKL

    @DevMax_Plg Then it's because you don't save the data as well as the material.
    For version 1.13+ you only have to save the material.
    For version < 1.13 you have to save the data as well as the material.
    You can get the data by using block#getData()
     
  4. Offline

    DevMax_Plg

    But how do i save that
    You can save only 2 things in a hashmap
     
  5. Offline

    KarimAKL

    @DevMax_Plg You can make a nested map like this: Map<Location, Map<Material, Byte>>
    Though i think it would be better to make a new class that contains the material and data.
     
Thread Status:
Not open for further replies.

Share This Page