πŸŽ—οΈIntelligentItem

Here you will find all the methods that are in the IntelligentItem class.

Is needed if you have to assign an event directly to items. This saves you from those typical classes where you ask for the title of the inventory and the display name of the item. All this is no longer needed.

Method overview

Method
Description

of

You create a new IntelligentItem with an ItemStack. Furthermore, you receive the InventoryClickEvent directly through the consumer. There you can execute actions when the item is clicked. Optional is the class IntelligentItemError, if the player has no click or view rights.

empty

You create an ItemStack which has no InventoryClickEvent. If you click on the item nothing happens. Again, you can add the IntelligentItemError class if the player does not have click or view rights.

ignored

You can create item stacks here that are not needed at all and are exchanged by the player. However, to empty the player can take this item from the inventory. Again, you can add the IntelligentItemError class if the player does not have click or view rights.

clearConsumer

You can remove the consumer from the ItemStack if you wish. After calling the method, the behavior is similar to the #empty method.

identifier

Gives the item an ID.

canClick

Determines by the BooleanSupplier if he can click on the item. You determine the BooleanSupplier.

canSee

Determines by the BooleanSupplier if it can see the item. You determine the BooleanSupplier.

update

Updates the item with a new item. The consumer will be taken over as well.

serialize

Serializes the ItemStack and returns you the property in a Map<String, Object>.

Last updated