Class MenuSlot

java.lang.Object
wbs.utils.util.menus.MenuSlot
Direct Known Subclasses:
PageSlot

public class MenuSlot extends Object
  • Field Details

    • item

      @NotNull protected @NotNull org.bukkit.inventory.ItemStack item
    • clickAction

      @Nullable protected @Nullable Consumer<org.bukkit.event.inventory.InventoryClickEvent> 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

      protected final WbsPlugin plugin
  • Constructor Details

    • MenuSlot

      public MenuSlot(@NotNull @NotNull WbsPlugin plugin, @NotNull @NotNull org.bukkit.Material material, @NotNull @NotNull String displayName, boolean shiny, @Nullable @Nullable List<String> lore)
    • MenuSlot

      public MenuSlot(@NotNull @NotNull WbsPlugin plugin, @NotNull @NotNull org.bukkit.Material material, @NotNull @NotNull String displayName, boolean shiny, @Nullable @Nullable String... lore)
    • MenuSlot

      public MenuSlot(@NotNull @NotNull WbsPlugin plugin, @NotNull @NotNull org.bukkit.Material material, @NotNull @NotNull String displayName, @Nullable @Nullable String... lore)
    • MenuSlot

      public MenuSlot(@NotNull @NotNull WbsPlugin plugin, @NotNull @NotNull org.bukkit.Material material, @NotNull @NotNull String displayName, @Nullable @Nullable List<String> lore)
    • 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

      protected String formatString(@Nullable @Nullable org.bukkit.entity.Player player, String string)
    • 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)