Package de.marcely.bedwars.api.hook
Interface NicknamingHook
- All Superinterfaces:
Hook
Represents a hook that modifies the display name of a player.
-
Method Summary
Modifier and TypeMethodDescriptiondefault HookCategory
Get the category of the hook.@Nullable String
getNickname
(Player player) Get the nickname that a player is currently using.getRealName
(Player player) Get the real name of the player.default boolean
hasNickname
(Player player) Get whether a player currently has a nickname.Methods inherited from interface de.marcely.bedwars.api.hook.Hook
getHookedPlugin, getManagingPlugin, isActive
-
Method Details
-
getCategory
Description copied from interface:Hook
Get the category of the hook.- Specified by:
getCategory
in interfaceHook
- Returns:
- The category of the hook
-
hasNickname
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
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
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
-