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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
close()
void
consumeItem
(int slot) void
consumeItem
(int slot, int amount) void
consumeItem
(int slot, int amount, boolean replaceConsumables) boolean
int
boolean
This method checks whether thisDirtyChestMenu
is currently viewed by aPlayer
.boolean
isDirty()
void
void
Opens this Menu for the specified Player/sAdds givenItemStack
to any of the given inventory slots.void
replaceExistingItem
(int slot, ItemStack item) Modifies an ItemStack in an ALREADY OPENED ChestMenuvoid
replaceExistingItem
(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 thisDirtyChestMenu
is 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:ChestMenu
Opens this Menu for the specified Player/s -
close
public void close() -
fits
-
pushItem
Adds givenItemStack
to 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:ChestMenu
Modifies an ItemStack in an ALREADY OPENED ChestMenu- Overrides:
replaceExistingItem
in classChestMenu
- Parameters:
slot
- The Slot of the Item which will be replaceditem
- The new Item
-
replaceExistingItem
-