Interface NicknamingHook

All Superinterfaces:
Hook

public interface NicknamingHook extends Hook
Represents a hook that modifies the display name of a player.
  • Method Details

    • getCategory

      default HookCategory getCategory()
      Description copied from interface: Hook
      Get the category of the hook.
      Specified by:
      getCategory in interface Hook
      Returns:
      The category of the hook
    • hasNickname

      default boolean hasNickname(Player player)
      Get whether a player currently has a nickname.
      Parameters:
      player - The player we want to check
      Returns:
      true in case his display name has been modified
    • getNickname

      @Nullable @Nullable String getNickname(Player player)
      Get the nickname that a player is currently using.
      Parameters:
      player - The player we want to check
      Returns:
      The nickname. null if he doesn't have any
    • getRealName

      String getRealName(Player player)
      Get the real name of the player.

      Usually it's just HumanEntity.getName().

      Parameters:
      player - The player we want to check
      Returns:
      His real name