Package org.bukkit.craftbukkit.v1_6_R1.inventory

Examples of org.bukkit.craftbukkit.v1_6_R1.inventory.CraftInventoryCustom


    {
      // We use 36 here since it's the size of the player inventory (without armor)
      size = 36;
     
      // This is a PlayerInventory
      ret = new CraftInventoryPlayer(new MCorePlayerInventory());
      PlayerInventory pret = (PlayerInventory)ret;
     
      // helmet
      if (jsonInventory.has(HELMET))
      {
View Full Code Here


   * @return      Deserialized inventory
   */
  public static Inventory fromString(String data) {
    ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data));
    NBTTagList itemList = (NBTTagList) readNbt(new DataInputStream(inputStream), 0);
    Inventory inventory = new CraftInventoryCustom(null, itemList.size());

    for (int i = 0; i < itemList.size(); i++) {
      NBTTagCompound inputObject = itemList.get(i);

      if (!inputObject.isEmpty()) {
        inventory.setItem(i, CraftItemStack.asCraftMirror(
            net.minecraft.server.v1_7_R1.ItemStack.createStack(inputObject)));
      }
    }

    // Serialize that array
View Full Code Here

  }

  public void onAdd(RemoteEntity inEntity)
  {
    super.onAdd(inEntity);
    this.m_inventory = new CraftInventoryCustom((InventoryHolder)this.m_entity.getHandle(), this.m_size);
  }
View Full Code Here

TOP

Related Classes of org.bukkit.craftbukkit.v1_6_R1.inventory.CraftInventoryCustom

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.