/** * Get the title of this inventory window. * * @return The title. */ public final String getTitle() { return getTopInventory().getTitle(); } }
/** * Gets the list of players viewing the primary (upper) inventory involved * in this event * * @return A list of people viewing. */ public List<HumanEntity> getViewers() { return transaction.getTopInventory().getViewers(); }
/** * Check the total number of slots in this view, combining the upper and * lower inventories. * <p> * Note though that it's possible for this to be greater than the sum of * the two inventories if for example some slots are not being used. * * @return The total size */ public final int countSlots() { return getTopInventory().getSize() + getBottomInventory().getSize(); }
/** * Get the result of this recipe. * * @return The resulting stack. */ public ItemStack getResult() { return output.clone(); } }
public InventoryHolder getLeftSide() { return inventory.getLeftSide().getHolder(); }
public InventoryHolder getRightSide() { return inventory.getRightSide().getHolder(); }
/** * Sets the material that a character in the recipe shape refers to. * * @param key The character that represents the ingredient in the shape. * @param ingredient The ingredient. * @return The changed recipe, so you can chain calls. */ public ShapedRecipe setIngredient(char key, Material ingredient) { return setIngredient(key, ingredient, 0); }
/** * Returns the player involved in this event * * @return Player who is involved in this event */ public final HumanEntity getPlayer() { return transaction.getPlayer(); }
/** * Get the recipe that has been formed. If this event was triggered by a * tool repair, this will be a temporary shapeless recipe representing the * repair. * * @return The recipe being crafted. */ public Recipe getRecipe() { return matrix.getRecipe(); }
/** * Set the ItemMeta of this ItemStack. * * @param itemMeta new ItemMeta, or null to indicate meta data be cleared. * @return True if successfully applied ItemMeta, see {@link * ItemFactory#isApplicable(ItemMeta, ItemStack)} * @throws IllegalArgumentException if the item meta was not created by * the {@link ItemFactory} */ public boolean setItemMeta(ItemMeta itemMeta) { return setItemMeta0(itemMeta, getType0()); }
/** * Sets the input of this furnace recipe. * * @param input The input material. * @return The changed recipe, so you can chain calls. */ public FurnaceRecipe setInput(Material input) { return setInput(input, 0); }
/** * Removes multiple instances of an ingredient from the list. If there are * less instances then specified, all will be removed. Only removes exact * matches, with a data value of 0. * * @param count The number of copies to remove. * @param ingredient The ingredient to remove * @return The changed recipe. */ public ShapelessRecipe removeIngredient(int count, Material ingredient) { return removeIngredient(count, ingredient, 0); }
/** * Get the result. * * @return The result stack. */ public ItemStack getResult() { return output.clone(); } }
/** * Returns the player involved in this event * * @return Player who is involved in this event */ public final HumanEntity getPlayer() { return transaction.getPlayer(); }
/** * Removes an ingredient from the list. If the ingredient occurs multiple * times, only one instance of it is removed. Only removes exact matches, * with a data value of 0. * * @param ingredient The ingredient to remove * @return The changed recipe. */ public ShapelessRecipe removeIngredient(Material ingredient) { return removeIngredient(ingredient, 0); }
/** * Gets an ItemStack representing the cursor prior to any modifications * as a result of this drag. * * @return the original cursor */ public ItemStack getOldCursor() { return oldCursor.clone(); }
/** * Get the result of this recipe. * * @return The result stack. */ public ItemStack getResult() { return output.clone(); }
/** * Gets the item that is being consumed. Modifying the returned item will * have no effect, you must use {@link * #setItem(org.bukkit.inventory.ItemStack)} instead. * * @return an ItemStack for the item being consumed */ public ItemStack getItem() { return item.clone(); }
/** * Gets the ItemStack being moved; if modified, the original item will not * be removed from the source inventory. * * @return ItemStack */ public ItemStack getItem() { return itemStack.clone(); }