Class NoNickOtherEvent

java.lang.Object
org.bukkit.event.Event
dev.majek.hexnicks.api.NoNickOtherEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class NoNickOtherEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Handles the event fired when a player removes another player's nickname.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    NoNickOtherEvent(@NotNull org.bukkit.command.CommandSender deleter, @NotNull org.bukkit.entity.Player target, @NotNull net.kyori.adventure.text.Component oldNick)
    Fires when a player removes another player's nickname using /nonick.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.command.CommandSender
    The CommandSender removing the target()'s nickname.
    static org.bukkit.event.HandlerList
    Get the HandlerList.
    @NotNull org.bukkit.event.HandlerList
    boolean
    @NotNull net.kyori.adventure.text.Component
    The old nickname being removed.
    void
    setCancelled(boolean cancel)
    org.bukkit.entity.Player
    The in-fame player who's nickname is being removed by deleter().

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NoNickOtherEvent

      public NoNickOtherEvent(@NotNull @NotNull org.bukkit.command.CommandSender deleter, @NotNull @NotNull org.bukkit.entity.Player target, @NotNull @NotNull net.kyori.adventure.text.Component oldNick)
      Fires when a player removes another player's nickname using /nonick.
      Parameters:
      deleter - The player or console removing the player's nickname.
      target - The player whose nickname is being removed.
      oldNick - The player's old nickname being removed.
  • Method Details

    • deleter

      public org.bukkit.command.CommandSender deleter()
      The CommandSender removing the target()'s nickname.
      Returns:
      Deleter.
    • target

      public org.bukkit.entity.Player target()
      The in-fame player who's nickname is being removed by deleter().
      Returns:
      Target.
    • 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 interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Get the HandlerList. Bukkit requires this.
      Returns:
      HandlerList.