Class NamedGui
java.lang.Object
com.github.stefvanschie.inventoryframework.gui.type.util.Gui
com.github.stefvanschie.inventoryframework.gui.type.util.NamedGui
- Direct Known Subclasses:
AnvilGui, BarrelGui, BlastFurnaceGui, BrewingStandGui, CartographyTableGui, ChestGui, CrafterGui, CraftingTableGui, DispenserGui, DropperGui, EnchantingTableGui, EnderChestGui, FurnaceGui, GrindstoneGui, HopperGui, LoomGui, MerchantGui, ModernSmithingTableGui, ShulkerBoxGui, SmithingTableGui, SmokerGui, StonecutterGui
-
Field Summary
Fields inherited from class Gui
dirty, humanEntityCache, inventory, onBottomClick, onBottomDrag, onClose, onGlobalClick, onGlobalDrag, onOutsideClick, onTopClick, onTopDrag, plugin, updating -
Constructor Summary
ConstructorsConstructorDescriptionNamedGui(@NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder title) Constructs a new gui with a titleNamedGui(@NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder title, @NotNull Plugin plugin) Constructs a new gui with a title for the givenplugin.Constructs a new gui with a titleConstructs a new gui with a title for the givenplugin. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetTitle()Returns the title of this gui as a legacy string.@NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolderReturns the title of this GUI in a wrapped form.booleanisDirty()Deprecated.voidDeprecated.useGui.markChanges()instead.voidsetTitle(@NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder title) Sets the title for this inventory.voidSets the title for this inventory.Methods inherited from class Gui
addInventory, callCallback, callOnBottomClick, callOnBottomDrag, callOnClose, callOnGlobalClick, callOnGlobalDrag, callOnOutsideClick, callOnTopClick, callOnTopDrag, click, copy, getGui, getHumanEntityCache, getItems, getViewerCount, getViewers, initializeOrThrow, isPlayerInventoryUsed, isUpdating, load, load, loadPane, loadPane, navigateToParent, registerGui, registerPane, registerPane, registerProperty, setOnBottomClick, setOnBottomDrag, setOnClose, setOnGlobalClick, setOnGlobalDrag, setOnOutsideClick, setOnTopClick, setOnTopDrag, setParent, show, update
-
Constructor Details
-
NamedGui
Constructs a new gui with a title- Parameters:
title- the title/name of this gui- Since:
- 0.8.0
-
NamedGui
public NamedGui(@NotNull @NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder title) Constructs a new gui with a title- Parameters:
title- the title/name of this gui- Since:
- 0.10.0
-
NamedGui
-
NamedGui
public NamedGui(@NotNull @NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder title, @NotNull @NotNull Plugin plugin) Constructs a new gui with a title for the givenplugin.- Parameters:
title- the title/name of this guiplugin- the owning plugin of this gui- Since:
- 0.10.8
- See Also:
-
-
Method Details
-
setTitle
Sets the title for this inventory.- Parameters:
title- the title
-
setTitle
public void setTitle(@NotNull @NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder title) Sets the title for this inventory.- Parameters:
title- the title- Since:
- 0.10.0
-
getTitle
Returns the title of this gui as a legacy string.- Returns:
- the title
- Since:
- 0.8.0
-
getTitleHolder
@NotNull @Contract(pure=true) public @NotNull com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder getTitleHolder()Returns the title of this GUI in a wrapped form.- Returns:
- the title
- Since:
- 0.10.0
-
isDirty
Deprecated.useGui.isDirty()instead.Gets whether this title is dirty or not i.e. whether the title has changed. -
markChanges
Deprecated.useGui.markChanges()instead.Marks that the changes present here have been accepted. This sets dirty to false. If dirty was already false, this will do nothing.- Overrides:
markChangesin classGui- Since:
- 0.10.0
-
Gui.isDirty()instead.