Class DirtyChestMenu
java.lang.Object
me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu
me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu
- Direct Known Subclasses:
BlockMenu,UniversalBlockMenu
-
Nested Class Summary
Nested classes/interfaces inherited from class me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu
ChestMenu.AdvancedMenuClickHandler, ChestMenu.MenuClickHandler, ChestMenu.MenuCloseHandler, ChestMenu.MenuOpeningHandler -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclose()voidconsumeItem(int slot) voidconsumeItem(int slot, int amount) voidconsumeItem(int slot, int amount, boolean replaceConsumables) booleanintbooleanThis method checks whether thisDirtyChestMenuis currently viewed by aPlayer.booleanisDirty()voidvoidOpens this Menu for the specified Player/sAdds givenItemStackto any of the given inventory slots.voidreplaceExistingItem(int slot, ItemStack item) Modifies an ItemStack in an ALREADY OPENED ChestMenuvoidreplaceExistingItem(int slot, ItemStack item, boolean event) Methods inherited from class me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu
addItem, addItem, addMenuClickHandler, addMenuCloseHandler, addMenuOpeningHandler, addPlayerInventoryClickHandler, build, getContents, getItemInSlot, getMenuClickHandler, getMenuCloseHandler, getMenuOpeningHandler, getPlayerInventoryClickHandler, isEmptySlotsClickable, isPlayerInventoryClickable, reset, setEmptySlotsClickable, setPlayerInventoryClickable, toInventory
-
Field Details
-
preset
-
changes
protected int changes
-
-
Constructor Details
-
DirtyChestMenu
-
-
Method Details
-
hasViewer
public boolean hasViewer()This method checks whether thisDirtyChestMenuis currently viewed by aPlayer.- Returns:
- Whether anyone is currently viewing this
Inventory
-
markDirty
public void markDirty() -
isDirty
public boolean isDirty() -
getUnsavedChanges
public int getUnsavedChanges() -
getPreset
-
canOpen
-
open
Description copied from class:ChestMenuOpens this Menu for the specified Player/s -
close
public void close() -
fits
-
pushItem
Adds givenItemStackto any of the given inventory slots. Items will be added to the inventory slots based on their order in the function argument. Items will be added either to any empty inventory slots or any partially filled slots, in which case as many items as can fit will be added to that specific spot. -
consumeItem
public void consumeItem(int slot) -
consumeItem
public void consumeItem(int slot, int amount) -
consumeItem
public void consumeItem(int slot, int amount, boolean replaceConsumables) -
replaceExistingItem
Description copied from class:ChestMenuModifies an ItemStack in an ALREADY OPENED ChestMenu- Overrides:
replaceExistingItemin classChestMenu- Parameters:
slot- The Slot of the Item which will be replaceditem- The new Item
-
replaceExistingItem
-