Interface PlayerData
public interface PlayerData
This interface allows you to view and change plugin data for a particular player.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAddHomepoint.booleanAddWarppoint.booleancontainsWarp(String name) Check forWarpexist by name.Viewing and changing a player's backpack.Gets defaultHomepoint.Gets defaultHomepoint.getHomes()A collection ofHomepoints.getKitGivedData(Kit kit) Getting data on a previously issued kit to a player.longgetKitGivedTime(Kit kit) Get the time of the last time a set was issued to a player.longGetting the time of the last exit.longGetting the time of the last login.getName()Gets the player's last known username.Gets aServerPlayer.longThe number of existing points at the player's home.longThe number of existing points at the player's warps.getUser()Gets aUser.GetWarpwhith namegetWarps()A collection of playerWarp's.homesListChatMenu(Locale locale, boolean allowRemove) Getting a clickable chat menu with a list of homes.booleanisGivedKit(Kit kit) Check if the kit has been issued to a player before.booleanWhether the player's balance is hidden at this time.booleanremoveHome(String name) RemoveHomepointbooleanremoveWarp(String name) RemoveWarppoint<ServerPlayer>
CommandResultrunCommand(Locale sourceLocale, String command) Forcing a player to use a command.save()voidsendMessage(String string) Sending a message to a player if he is online.voidsendMessage(Component component) Sending a message to a player if he is online.voidsetBackpack(Backpack backpack) Set a new backpack for the player.voidsetHideBalance(boolean hideBalance) Hiding/displaying player balance.Getting a clickable chat menu with a list of warps.
-
Method Details
-
getName
String getName()Gets the player's last known username. -
getUniqueId
UUID getUniqueId() -
getPlayer
Optional<ServerPlayer> getPlayer()Gets aServerPlayer. -
getUser
Gets aUser. -
getHomes
A collection ofHomepoints. -
getWarps
A collection of playerWarp's. -
getTotalHomes
long getTotalHomes()The number of existing points at the player's home. -
getTotalWarps
long getTotalWarps()The number of existing points at the player's warps. -
addHome
AddHomepoint. -
removeHome
RemoveHomepoint -
addWarp
AddWarppoint. -
removeWarp
RemoveWarppoint -
containsWarp
Check forWarpexist by name. -
getDefaultHome
Gets defaultHomepoint. -
getHome
Gets defaultHomepoint. -
getWarp
GetWarpwhith name -
getBackpack
Backpack getBackpack()Viewing and changing a player's backpack. -
setBackpack
Set a new backpack for the player. -
homesListChatMenu
Getting a clickable chat menu with a list of homes.- Parameters:
locale- - Localization of chat buttons.allowRemove- - Allow deleting home points through the chat menu.
-
warpsListChatMenu
List<Component> warpsListChatMenu(Locale locale, Predicate<Warp> allowRemove, Predicate<Warp> allowTeleport) Getting a clickable chat menu with a list of warps.- Parameters:
locale- - Localization of chat buttons.allowRemove- - Allow deleting warp points through the chat menu.
-
sendMessage
Sending a message to a player if he is online. -
sendMessage
Sending a message to a player if he is online. -
getLastJoinTime
long getLastJoinTime()Getting the time of the last login. -
getLastExitTime
long getLastExitTime()Getting the time of the last exit. -
getKitGivedData
Getting data on a previously issued kit to a player. -
isGivedKit
Check if the kit has been issued to a player before. -
getKitGivedTime
Get the time of the last time a set was issued to a player. -
isHideBalance
boolean isHideBalance()Whether the player's balance is hidden at this time. Used only in the CommandPack economy. -
setHideBalance
void setHideBalance(boolean hideBalance) Hiding/displaying player balance. -
runCommand
<ServerPlayer> CommandResult runCommand(Locale sourceLocale, String command) throws CommandException Forcing a player to use a command.- Throws:
CommandException
-
save
PlayerData save()
-