Solved Put all the materials in a class

Discussion in 'Spigot Plugin Development' started by Giorgino, Feb 10, 2020.

  1. Hello everyone, does anyone know how I can add a block in a GUI and then save that GUI? So when the command is typed and the GUI is opened that block will remain.
     
  2. You need to keep the ineventory variable loaded. You can put the inventory variable on your main class ang make getters and setters or create another class that will save the inventory and that class save it in the main class
    Another option is to save the inventory in a YAML file
     
    • Winner Winner x 1
  3. Thanks, I also wanted to ask another thing without creating another post. How can I take for example the material "oak pressure plate" or "spruce trapdoor" because I can't get them ..
     
  4. #4 Nemo_64, Feb 10, 2020
    Last edited: Feb 10, 2020
    • Useful Useful x 1
  5. Strange, because although I added the libraries do not appear to me ..
     
  6. In Minecraft 1.12 those items didn't exist, in 1.13 and further they do
     
    • Useful Useful x 1
  7. However, if you did not understand I am trying to put all the materials in a class and then thanks to that class I will be able to take the material and perform various events. But the problem is that I can't find all the materials. Does anyone know how to do?
     
    • Useful Useful x 1
  8. Depending on the version I use different blocks ..
     
  9. XMaterials is done for that, beeing able to get materials from other versions
     
    • Winner Winner x 1
  10. Wow! Thank you!