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,CraftingTableGui,DispenserGui,DropperGui,EnchantingTableGui,EnderChestGui,FurnaceGui,GrindstoneGui,HopperGui,MerchantGui,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 -
Constructor Summary
Constructors -
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, callOnBottomClick, callOnBottomDrag, callOnClose, callOnGlobalClick, callOnGlobalDrag, callOnOutsideClick, callOnTopClick, callOnTopDrag, click, copy, getGui, getHumanEntityCache, getViewerCount, getViewers, initializeOrThrow, isPlayerInventoryUsed, isUpdating, load, loadPane, registerGui, 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
-
-
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
-