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 HookCategoryGet the category of the hook.@Nullable StringgetNickname(Player player) Get the nickname that a player is currently using.@Nullable StringgetRealName(Player player) Get the real name of the player.default booleanhasNickname(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:HookGet the category of the hook.- Specified by:
getCategoryin 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:
truein 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.
nullif he doesn't have any
-
getRealName
Get the real name of the player.- Parameters:
player- The player we want to check- Returns:
- His real name.
nullif he doesn't have any nickname or it's justHumanEntity.getName()
-