Class RyseInventoryTitleChangeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.github.rysefoxx.inventory.plugin.events.RyseInventoryTitleChangeEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class RyseInventoryTitleChangeEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
- Since:
- 7/4/2022
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionRyseInventoryTitleChangeEvent(@NotNull org.bukkit.entity.Player player, @NotNull net.kyori.adventure.text.Component oldTitle, @NotNull net.kyori.adventure.text.Component newTitle) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerList@NotNull String@NotNull StringbooleanIf true, the title set viasetNewTitle(String)will be ignored.@NotNull net.kyori.adventure.text.ComponentnewTitle()@NotNull net.kyori.adventure.text.ComponentoldTitle()voidsetCancelled(boolean cancel) voidsetNewTitle(@NotNull String newTitle) Gives the inventory a new title.voidsetNewTitle(@NotNull net.kyori.adventure.text.Component newTitle) Gives the inventory a new title.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
RyseInventoryTitleChangeEvent
public RyseInventoryTitleChangeEvent(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull net.kyori.adventure.text.Component oldTitle, @NotNull @NotNull net.kyori.adventure.text.Component newTitle) - Parameters:
player- The player who changed the title.newTitle- The new title of the inventory.oldTitle- The old title of the inventory. This event is called when the title of the inventory changes.
-
-
Method Details
-
getHandlerList
@Contract(pure=true) public static org.bukkit.event.HandlerList getHandlerList() -
isCancelled
public boolean isCancelled()If true, the title set viasetNewTitle(String)will be ignored.- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getOldTitle
- Returns:
- The previous title of the inventory.
-
oldTitle
@NotNull public @NotNull net.kyori.adventure.text.Component oldTitle()- Returns:
- The previous title of the inventory.
-
getNewTitle
- Returns:
- The new title of the inventory.
-
newTitle
@NotNull public @NotNull net.kyori.adventure.text.Component newTitle()- Returns:
- The new title of the inventory.
-
setNewTitle
Gives the inventory a new title.- Parameters:
newTitle- The new title of the inventory.If isCancelled is true, the title will not be set.
-
setNewTitle
public void setNewTitle(@NotNull @NotNull net.kyori.adventure.text.Component newTitle) Gives the inventory a new title.- Parameters:
newTitle- The new title of the inventory.If isCancelled is true, the title will not be set.
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-