Examples of CraftInventoryCustom


Examples of org.bukkit.craftbukkit.inventory.CraftInventoryCustom

   *
   * @param tags Tag list
   * @return Inventory
   */
  public static Inventory createInventory(CommonTagList tags) {
    Inventory inv = new CraftInventoryCustom(null, tags.size());
   
    for(int i = 0; i < tags.size(); i++) {
      CommonTagCompound tag = (CommonTagCompound) tags.get(i);
      if(!tag.isEmpty()) {
        inv.setItem(i, CraftItemStack.asCraftMirror(ItemStack.createStack(
            (NBTTagCompound) tag.getHandle())));
      }
    }
   
    return inv;
View Full Code Here

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

      pret.setLeggings(pinventory.getLeggings() == null ? null : new ItemStack(pinventory.getLeggings()));
      pret.setBoots(pinventory.getBoots() == null ? null : new ItemStack(pinventory.getBoots()));
    }
    else
    {
      ret = new CraftInventoryCustom(holder, size, title);
    }
   
    ItemStack[] contents = cloneItemStacks(inventory.getContents());
    ret.setContents(contents);
   
View Full Code Here

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

    {
      // A custom size were specified
      size = jsonSize.getAsInt();
     
      // This is a "Custom" Inventory (content only).
      ret = new CraftInventoryCustom(null, size);
    }
   
    // Now process content
    ItemStack[] itemStacks = new ItemStack[size];
    for (int i = 0; i < size; i++)
View Full Code Here

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

   * @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

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

  }

  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
Copyright © 2018 www.massapi.com. 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.