Package net.citizensnpcs.api.gui
Class InventoryMenuSlot
java.lang.Object
net.citizensnpcs.api.gui.InventoryMenuSlot
Represents a single inventory slot in a
InventoryMenu
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a click handler to this slot.void
clear()
boolean
int
hashCode()
void
void
setDescription
(String description) void
setFilter
(Collection<InventoryAction> filter) Sets a newClickType
filter that will only accept clicks with the given type.void
setItemStack
(ItemStack stack) Manually set theItemStack
for this slotvoid
setItemStack
(ItemStack stack, String name) void
setItemStack
(ItemStack stack, String name, String description)
-
Method Details
-
addClickHandler
Adds a click handler to this slot.- Parameters:
func
- The click handler to run
-
clear
public void clear() -
equals
-
getClickHandlers
-
getCurrentItem
-
getFilter
- Returns:
- The set of
InventoryAction
s that will be allowed
-
hashCode
public int hashCode() -
setClickHandler
-
setDescription
-
setFilter
Sets a newClickType
filter that will only accept clicks with the given type. An empty set is equivalent to allowing all click types.- Parameters:
filter
- The new filter
-
setItemStack
Manually set theItemStack
for this slot- Parameters:
stack
-
-
setItemStack
-
setItemStack
-