Package dev.triumphteam.gui.guis
Class Gui
java.lang.Object
dev.triumphteam.gui.guis.BaseGui
dev.triumphteam.gui.guis.Gui
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
public class Gui extends BaseGui
Standard GUI implementation of
BaseGui
-
Constructor Summary
Constructors Constructor Description Gui(int rows, @NotNull java.lang.String title)
Deprecated.In favor ofGui(int, Component)
Gui(int rows, @NotNull net.kyori.adventure.text.Component title)
Alternative constructor to provide a way to create GUIs that don't need anyInteractionModifier
Gui(int rows, @NotNull net.kyori.adventure.text.Component title, @NotNull java.util.Set<InteractionModifier> interactionModifiers)
Main constructor for the GUI, now withComponent
supportGui(@NotNull GuiType guiType, @NotNull java.lang.String title)
Deprecated.In favor ofGui(GuiType, Component)
Gui(@NotNull GuiType guiType, @NotNull net.kyori.adventure.text.Component title)
Main constructor that takes aGuiType
instead of rowsGui(@NotNull GuiType guiType, @NotNull net.kyori.adventure.text.Component title, @NotNull java.util.Set<InteractionModifier> interactionModifiers)
Alternative constructor that takes both aGuiType
and a set ofInteractionModifier
Gui(@NotNull java.lang.String title)
Deprecated.In favor ofGui(Component)
Gui(@NotNull net.kyori.adventure.text.Component title)
Alternative constructor that defaults to 1 row -
Method Summary
Modifier and Type Method Description static SimpleBuilder
gui()
Creates aSimpleBuilder
with CHEST as theGuiType
static SimpleBuilder
gui(@NotNull GuiType type)
Creates aSimpleBuilder
to build aGui
static PaginatedBuilder
paginated()
Creates aPaginatedBuilder
to build aPaginatedGui
static ScrollingBuilder
scrolling()
Creates aScrollingBuilder
with VERTICAL as theScrollType
static ScrollingBuilder
scrolling(@NotNull ScrollType scrollType)
Creates aScrollingBuilder
to build aScrollingGui
static StorageBuilder
storage()
Creates aStorageBuilder
.Methods inherited from class dev.triumphteam.gui.guis.BaseGui
addItem, addSlotAction, addSlotAction, canPlaceItems, canSwapItems, canTakeItems, close, close, disableAllInteractions, disableItemPlace, disableItemSwap, disableItemTake, enableAllInteractions, enableItemPlace, enableItemSwap, enableItemTake, getFiller, getGuiItem, getGuiItems, getInventory, getRows, guiType, isUpdating, open, removeItem, removeItem, setCloseGuiAction, setDefaultClickAction, setDefaultTopClickAction, setDragAction, setInventory, setItem, setItem, setItem, setOpenGuiAction, setOutsideClickAction, setPlayerInventoryAction, setUpdating, update, updateItem, updateItem, updateItem, updateItem, updateTitle, updateTitle
-
Constructor Details
-
Gui
public Gui(int rows, @NotNull @NotNull net.kyori.adventure.text.Component title, @NotNull @NotNull java.util.Set<InteractionModifier> interactionModifiers)Main constructor for the GUI, now withComponent
support- Parameters:
rows
- The amount of rows the GUI should havetitle
- The GUI's title usingComponent
interactionModifiers
- A set containing theInteractionModifier
this GUI should use- Since:
- 3.0.0
-
Gui
public Gui(int rows, @NotNull @NotNull net.kyori.adventure.text.Component title)Alternative constructor to provide a way to create GUIs that don't need anyInteractionModifier
- Parameters:
rows
- The amount of rows the GUI should havetitle
- The GUI's title usingComponent
- Since:
- 3.0.0
-
Gui
public Gui(@NotNull @NotNull net.kyori.adventure.text.Component title)Alternative constructor that defaults to 1 row- Parameters:
title
- The GUI's title usingComponent
- Since:
- 3.0.0
-
Gui
public Gui(@NotNull @NotNull GuiType guiType, @NotNull @NotNull net.kyori.adventure.text.Component title)Main constructor that takes aGuiType
instead of rows- Parameters:
guiType
- TheGuiType
to be usedtitle
- The GUI's title usingComponent
- Since:
- 3.0.0
-
Gui
public Gui(@NotNull @NotNull GuiType guiType, @NotNull @NotNull net.kyori.adventure.text.Component title, @NotNull @NotNull java.util.Set<InteractionModifier> interactionModifiers)Alternative constructor that takes both aGuiType
and a set ofInteractionModifier
- Parameters:
guiType
- TheGuiType
to be usedtitle
- The GUI's title usingComponent
interactionModifiers
- A set containing theInteractionModifier
this GUI should use- Since:
- 3.0.0
-
Gui
@Deprecated public Gui(int rows, @NotNull @NotNull java.lang.String title)Deprecated.In favor ofGui(int, Component)
Old main constructor for the GUI- Parameters:
rows
- The amount of rows the GUI should havetitle
- The GUI's title
-
Gui
@Deprecated public Gui(@NotNull @NotNull java.lang.String title)Deprecated.In favor ofGui(Component)
Alternative constructor that defaults to 1 row- Parameters:
title
- The GUI's title
-
Gui
@Deprecated public Gui(@NotNull @NotNull GuiType guiType, @NotNull @NotNull java.lang.String title)Deprecated.In favor ofGui(GuiType, Component)
Main constructor that takes aGuiType
instead of rows- Parameters:
guiType
- TheGuiType
to be usedtitle
- The GUI's title
-
-
Method Details
-
gui
Creates aSimpleBuilder
to build aGui
- Parameters:
type
- TheGuiType
to be used- Returns:
- A
SimpleBuilder
- Since:
- 3.0.0
-
gui
Creates aSimpleBuilder
with CHEST as theGuiType
- Returns:
- A CHEST
SimpleBuilder
- Since:
- 3.0.0
-
storage
Creates aStorageBuilder
.- Returns:
- A CHEST
StorageBuilder
. - Since:
- 3.0.0.
-
paginated
Creates aPaginatedBuilder
to build aPaginatedGui
- Returns:
- A
PaginatedBuilder
- Since:
- 3.0.0
-
scrolling
@Contract("_ -> new") public static ScrollingBuilder scrolling(@NotNull @NotNull ScrollType scrollType)Creates aScrollingBuilder
to build aScrollingGui
- Parameters:
scrollType
- TheScrollType
to be used by the GUI- Returns:
- A
ScrollingBuilder
- Since:
- 3.0.0
-
scrolling
Creates aScrollingBuilder
with VERTICAL as theScrollType
- Returns:
- A vertical
SimpleBuilder
- Since:
- 3.0.0
-