Storing a block and ALL data?

Discussion in 'Plugin Development' started by Jnorr44, Jun 1, 2013.

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

    Jnorr44

    I was wondering if there was any way to store a block and all info, including chest inventories, sign lines, etc, etc, all in one class. If so could someone point me in the right direction, because I have been unable to figure this out.
     
  2. Offline

    Lactem

    I don't think there's a simple command to get all of the data, but for signs, you could try getting the ItemMeta and saving it in a .yml file. As for chests, you could do something like

    Code:
    Chest chest = (Chest) new ItemStack(Material.CHEST);
                Inventory chestInventory = chest.getBlockInventory();
    Just for getting a block, I would do block.getType(); or block.getTypeID();
     
  3. Offline

    Jnorr44

    This is what I am saying, I really wish there was just one method to get everything from the block and store it. That would make life much easier for everyone.
     
  4. Offline

    Lactem

    Maybe join the irc and request it? Perhaps EvilSeph will make a .getAllData().
     
  5. Offline

    Jnorr44

    Or at least just inplement configurationserializable and give us serialize() and deserialize() methods.
     
Thread Status:
Not open for further replies.

Share This Page