Creating an inventory

Discussion in 'Plugin Development' started by Crash, Aug 1, 2011.

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

    Crash

    I want to create my own inventory that I will somehow be able to cast to an IInventory. Is there any class I can use for this ?

    Possibly create a class that implements IInventory ?
     
  2. Offline

    masteroftime

    Try it with CraftInventory. I can't test it right now but most of the implementations start with Craft.

    And you also have to include Craftbukkit.jar directly into your project as all the implementations of the interfaces in Bukkit are there.
     
  3. Offline

    Crash

    Its constructor requires an IInventory so I assume it's basically referencing an already made inventory
    I want to make an inventory that isn't used by any chest so I need to make my own
     
  4. Offline

    masteroftime

    Ok, here are all the classes from minecraft server that implement IInventory: EntityMinecart, InventoryCrafting, InventoryCraftResult, InventoryLargeChest, InventoryPlayer, TileEntityChest, TileEntityDispenser, TileEntityFurnace

    I think the best would probably to use TileEntityChest. I don't know if creating a new object also creates a Chest or not.
    The other alternative would be to implement your own Inventory class.
     
Thread Status:
Not open for further replies.

Share This Page