Class StaticClickHandler
java.lang.Object
de.clickism.clickgui.menu.handler.StaticClickHandler
- All Implemented Interfaces:
ClickHandler
A click handler that does not allow changing the inventory of a menu in any way.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhandleClick(org.bukkit.event.inventory.InventoryClickEvent event) Handles a click on a menu.voidhandleDrag(org.bukkit.event.inventory.InventoryDragEvent event) Handles the drag on the menu.protected booleanisIllegalDoubleClick(org.bukkit.event.inventory.InventoryClickEvent event) Checks if the given click is an illegal double click, resulting in items being taken away from the menu.protected booleanisIllegalShiftClick(org.bukkit.event.inventory.InventoryClickEvent event) Checks if the given click is an illegal shift click, resulting in items being taken away from the menu.booleanisValidClick(org.bukkit.event.inventory.InventoryClickEvent event) Checks if a given click is valid.
-
Constructor Details
-
StaticClickHandler
public StaticClickHandler()Creates a new static click handler.
-
-
Method Details
-
handleClick
public boolean handleClick(org.bukkit.event.inventory.InventoryClickEvent event) Description copied from interface:ClickHandlerHandles a click on a menu. If the given click was processed by the handler and should not be passed onto the menu, it should return true. Otherwise, it should return false.- Specified by:
handleClickin interfaceClickHandler- Parameters:
event- event to handle- Returns:
- true if the click was handled, false otherwise
-
handleDrag
public void handleDrag(org.bukkit.event.inventory.InventoryDragEvent event) Description copied from interface:ClickHandlerHandles the drag on the menu.- Specified by:
handleDragin interfaceClickHandler- Parameters:
event- event to handle
-
isValidClick
public boolean isValidClick(org.bukkit.event.inventory.InventoryClickEvent event) Description copied from interface:ClickHandlerChecks if a given click is valid.- Specified by:
isValidClickin interfaceClickHandler- Parameters:
event- event to validate- Returns:
- true if click is valid, false otherwise
-
isIllegalShiftClick
protected boolean isIllegalShiftClick(org.bukkit.event.inventory.InventoryClickEvent event) Checks if the given click is an illegal shift click, resulting in items being taken away from the menu.- Parameters:
event- event to check- Returns:
- true if the click is an illegal shift click, false otherwise
-
isIllegalDoubleClick
protected boolean isIllegalDoubleClick(org.bukkit.event.inventory.InventoryClickEvent event) Checks if the given click is an illegal double click, resulting in items being taken away from the menu.- Parameters:
event- event to check- Returns:
- true if the click is an illegal double click, false otherwise
-