Package dev.majek.hexnicks.api
Class NoNickEvent
java.lang.Object
org.bukkit.event.Event
dev.majek.hexnicks.api.NoNickEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class NoNickEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Handles the event fired when a player removes their nickname.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionNoNickEvent
(@NotNull org.bukkit.entity.Player player, @NotNull net.kyori.adventure.text.Component oldNick) Fires when a player removes their nickname using/nonick
. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
Get the HandlerList.@NotNull org.bukkit.event.HandlerList
boolean
@NotNull net.kyori.adventure.text.Component
oldNick()
The old nickname being removed.org.bukkit.entity.Player
player()
The in-game player attempting to change the nickname.void
setCancelled
(boolean cancel) Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
NoNickEvent
public NoNickEvent(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull net.kyori.adventure.text.Component oldNick) Fires when a player removes their nickname using/nonick
.- Parameters:
player
- The in-game player changing the nickname.oldNick
- The player's old nickname being removed.
-
-
Method Details
-
player
public org.bukkit.entity.Player player()The in-game player attempting to change the nickname.- Returns:
- Player.
-
oldNick
@NotNull public @NotNull net.kyori.adventure.text.Component oldNick()The old nickname being removed.- Returns:
- Old nickname.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Get the HandlerList. Bukkit requires this.- Returns:
- HandlerList.
-