ConfigurationSerializable

Discussion in 'Plugin Development' started by Codisimus, Feb 4, 2013.

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

    Codisimus

    I read the wiki page and some forum posts but do not quite understand how this works. Someone out there must have an example of some code that saves an ItemStack in the config.
     
  2. Offline

    evilmidget38

    Codisimus
    Saving:
    Code:java
    1.  
    2. someConfigurationSection.set("SomePath", someItemStack);
    3.  


    Loading:
    Code:java
    1.  
    2. ItemStack someItemStack = (ItemStack) someConfigurationSection.get("SomePath");
    3.  
     
  3. Offline

    Sagacious_Zed Bukkit Docs

    There is a getItemStack method. But if there was not, you would have to cast.
     
  4. Offline

    Codisimus

    Great! that is simple, however I am trying to store a class that has an ItemStack as one of it's variables. So wut is the best way to go about that? Is it similar to this or perhaps even the exact same?
     
Thread Status:
Not open for further replies.

Share This Page