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 TypeMethodDescriptionvoidAdds a click handler to this slot.voidclear()booleaninthashCode()voidvoidsetDescription(String description) voidsetFilter(Collection<InventoryAction> filter) Sets a newClickTypefilter that will only accept clicks with the given type.voidsetItemStack(ItemStack stack) Manually set theItemStackfor this slotvoidsetItemStack(ItemStack stack, String name) voidsetItemStack(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
InventoryActions that will be allowed
-
hashCode
public int hashCode() -
setClickHandler
-
setDescription
-
setFilter
Sets a newClickTypefilter 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 theItemStackfor this slot- Parameters:
stack-
-
setItemStack
-
setItemStack
-