Class Slot
java.lang.Object
studio.magemonkey.fusion.gui.slot.Slot
Represent slot properties, multiple inventory slots may use this same instance of slot object as it don't
represent some slot, but properties of it.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.bukkit.inventory.ItemStackcanHoldItem(org.bukkit.inventory.ItemStack item) Method will check if this item can be inserted to this slot-type, it will return this same item stack if it can be inserted or null if it can't be inserted here.toString()
-
Field Details
-
BASE_CONTAINER_SLOT
-
BASE_HOTBAR_SLOT
-
BASE_CRAFTING_SLOT
-
SPECIAL_CRAFTING_SLOT
-
BASE_RESULT_SLOT
-
BLOCKED_SLOT
-
QUEUED_SLOT
-
BASE_OUTSIDE_SLOT
-
slotType
protected final org.bukkit.event.inventory.InventoryType.SlotType slotType-- GETTER -- Returns base slot type.
-
-
Constructor Details
-
Slot
public Slot(org.bukkit.event.inventory.InventoryType.SlotType slotType)
-
-
Method Details
-
canHoldItem
public abstract org.bukkit.inventory.ItemStack canHoldItem(org.bukkit.inventory.ItemStack item) Method will check if this item can be inserted to this slot-type, it will return this same item stack if it can be inserted or null if it can't be inserted here.
It may also return other itemstack with this same data but other amount if only part of item can be inserted. (returned itemstack is item stack that can be inserted). Like Beacon block, only one item from item stack can be inserted.
WARNING: it will not check if there is space in this slot, it only check if this slot can hold this type of item.- Parameters:
item- item stack to check.- Returns:
- item stack that can be inserted here or null.
-
toString
-