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,MerchantGui,ModernSmithingTableGui,ShulkerBoxGui,SmithingTableGui,SmokerGui,StonecutterGui
-
Field Summary
Fields inherited from class com.github.stefvanschie.inventoryframework.gui.type.util.Gui
humanEntityCache, inventory, onBottomClick, onBottomDrag, onClose, onGlobalClick, onGlobalDrag, onOutsideClick, onTopClick, onTopDrag, plugin -
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()Gets whether this title is dirty or not i.e. whether the title has changed.voidMarks that the changes present here have been accepted.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 com.github.stefvanschie.inventoryframework.gui.type.util.Gui
addInventory, callCallback, callOnBottomClick, callOnBottomDrag, callOnClose, callOnGlobalClick, callOnGlobalDrag, callOnOutsideClick, callOnTopClick, callOnTopDrag, click, copy, getGui, getHumanEntityCache, getViewerCount, getViewers, initializeOrThrow, isPlayerInventoryUsed, isUpdating, load, load, loadPane, loadPane, registerGui, registerGui, registerPane, registerPane, registerProperty, setOnBottomClick, setOnBottomDrag, setOnClose, setOnGlobalClick, setOnGlobalDrag, setOnOutsideClick, setOnTopClick, setOnTopDrag, 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
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:
-
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
@Contract(pure=true) public boolean isDirty()Gets whether this title is dirty or not i.e. whether the title has changed.- Returns:
- whether the title is dirty
- Since:
- 0.10.0
-
markChanges
public void markChanges()Marks that the changes present here have been accepted. This sets dirty to false. If dirty was already false, this will do nothing.- Since:
- 0.10.0
-