Package wbs.utils.util.menus
Class MenuSlot
java.lang.Object
wbs.utils.util.menus.MenuSlot
- Direct Known Subclasses:
PageSlot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected @Nullable Consumer<org.bukkit.event.inventory.InventoryClickEvent>protected @Nullable BiConsumer<WbsMenu,org.bukkit.event.inventory.InventoryClickEvent> protected booleanprotected booleanprotected @NotNull org.bukkit.inventory.ItemStackprotected final WbsPlugin -
Constructor Summary
ConstructorsConstructorDescriptionMenuSlot(@NotNull WbsPlugin plugin, @NotNull org.bukkit.Material material, @NotNull String displayName, boolean shiny, @Nullable String... lore) MenuSlot(@NotNull WbsPlugin plugin, @NotNull org.bukkit.Material material, @NotNull String displayName, boolean shiny, @Nullable List<String> lore) MenuSlot(@NotNull WbsPlugin plugin, @NotNull org.bukkit.Material material, @NotNull String displayName, @Nullable String... lore) MenuSlot(@NotNull WbsPlugin plugin, @NotNull org.bukkit.Material material, @NotNull String displayName, @Nullable List<String> lore) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanprotected StringformatString(@Nullable org.bukkit.entity.Player player, String string) @Nullable Consumer<org.bukkit.event.inventory.InventoryClickEvent>@Nullable BiConsumer<WbsMenu,org.bukkit.event.inventory.InventoryClickEvent> org.bukkit.inventory.ItemStackgetFormattedItem(@Nullable org.bukkit.entity.Player player) Get a clone of the item, with placeholders filled and colours created@NotNull org.bukkit.inventory.ItemStackgetItem()voidsetAllowItemTaking(boolean allowItemTaking) voidsetClickAction(@Nullable Consumer<org.bukkit.event.inventory.InventoryClickEvent> clickAction) voidsetClickActionMenu(@Nullable BiConsumer<WbsMenu, org.bukkit.event.inventory.InventoryClickEvent> clickActionMenu) voidsetCloseOnClick(boolean closeOnClick) voidsetFillPlaceholders(boolean fillPlaceholders)
-
Field Details
-
item
@NotNull protected @NotNull org.bukkit.inventory.ItemStack item -
clickAction
-
clickActionMenu
@Nullable protected @Nullable BiConsumer<WbsMenu,org.bukkit.event.inventory.InventoryClickEvent> clickActionMenu -
closeOnClick
protected boolean closeOnClick -
allowItemTaking
protected boolean allowItemTaking -
fillPlaceholders
protected boolean fillPlaceholders -
plugin
-
-
Constructor Details
-
MenuSlot
-
MenuSlot
-
MenuSlot
-
MenuSlot
-
MenuSlot
public MenuSlot(@NotNull @NotNull WbsPlugin plugin, @NotNull @NotNull org.bukkit.inventory.ItemStack item)
-
-
Method Details
-
getFormattedItem
public org.bukkit.inventory.ItemStack getFormattedItem(@Nullable @Nullable org.bukkit.entity.Player player) Get a clone of the item, with placeholders filled and colours created- Parameters:
player- The player to fill in placeholders for. When null, colours will be filled but no placeholders will be.- Returns:
- A cloned item formatted for display to a player
-
formatString
-
getItem
@NotNull public @NotNull org.bukkit.inventory.ItemStack getItem() -
getClickAction
@Nullable public @Nullable Consumer<org.bukkit.event.inventory.InventoryClickEvent> getClickAction() -
setClickAction
public void setClickAction(@Nullable @Nullable Consumer<org.bukkit.event.inventory.InventoryClickEvent> clickAction) -
getClickActionMenu
@Nullable public @Nullable BiConsumer<WbsMenu,org.bukkit.event.inventory.InventoryClickEvent> getClickActionMenu() -
setClickActionMenu
public void setClickActionMenu(@Nullable @Nullable BiConsumer<WbsMenu, org.bukkit.event.inventory.InventoryClickEvent> clickActionMenu) -
closeOnClick
public boolean closeOnClick() -
setCloseOnClick
public void setCloseOnClick(boolean closeOnClick) -
allowItemTaking
public boolean allowItemTaking() -
setAllowItemTaking
public void setAllowItemTaking(boolean allowItemTaking) -
fillPlaceholders
public boolean fillPlaceholders() -
setFillPlaceholders
public void setFillPlaceholders(boolean fillPlaceholders)
-