Interface StatefulIconModifier
- All Superinterfaces:
MenuIconModifier
A stateful modifier for an icon's
The
ItemBuilder
it wants to place in a menu.The
modify(com.kamikazejam.kamicommon.item.ItemBuilder, org.bukkit.inventory.ItemStack, org.bukkit.entity.Player, int)
method also provides the existing item in the menu (if it exists) and the Player
viewing the menu.-
Method Summary
Modifier and TypeMethodDescription@NotNull ItemBuilder
modify
(@NotNull ItemBuilder initialBuilder, @Nullable ItemStack currentItem, @NotNull Player player, int tickCounter) A simple modify method to edit the state of the builder for an Auto Updating icon.
There is no return value because the builder is modified in place.
-
Method Details
-
modify
@NotNull @NotNull ItemBuilder modify(@NotNull @NotNull ItemBuilder initialBuilder, @Nullable @Nullable ItemStack currentItem, @NotNull @NotNull Player player, int tickCounter) A simple modify method to edit the state of the builder for an Auto Updating icon.
There is no return value because the builder is modified in place.- Parameters:
initialBuilder
- is the initial builder of the icon, as configured prior to opening the menu.currentItem
- is the current item in the menu, if it exists. (null if the icon has not been placed yet)player
- is the player who is viewing the menu.tickCounter
- is the number of ticks since the menu was opened.- Returns:
- The modified builder (can be the same instance modified in place).
-