Interface PlayerData
public interface PlayerData
This interface allows you to view and change plugin data for a particular player.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
AddHome
point.boolean
AddWarp
point.boolean
containsWarp
(String name) Check forWarp
exist by name.Viewing and changing a player's backpack.Gets defaultHome
point.Gets defaultHome
point.getHomes()
A collection ofHome
points.getKitGivedData
(Kit kit) Getting data on a previously issued kit to a player.long
getKitGivedTime
(Kit kit) Get the time of the last time a set was issued to a player.long
Getting the time of the last exit.long
Getting the time of the last login.getName()
Gets the player's last known username.Gets aServerPlayer
.long
The number of existing points at the player's home.long
The number of existing points at the player's warps.getUser()
Gets aUser
.GetWarp
whith namegetWarps()
A collection of playerWarp
's.homesListChatMenu
(Locale locale, boolean allowRemove) Getting a clickable chat menu with a list of homes.boolean
isGivedKit
(Kit kit) Check if the kit has been issued to a player before.boolean
Whether the player's balance is hidden at this time.boolean
removeHome
(String name) RemoveHome
pointboolean
removeWarp
(String name) RemoveWarp
point<ServerPlayer>
CommandResultrunCommand
(Locale sourceLocale, String command) Forcing a player to use a command.save()
void
sendMessage
(String string) Sending a message to a player if he is online.void
sendMessage
(Component component) Sending a message to a player if he is online.void
setBackpack
(Backpack backpack) Set a new backpack for the player.void
setHideBalance
(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 ofHome
points. -
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
AddHome
point. -
removeHome
RemoveHome
point -
addWarp
AddWarp
point. -
removeWarp
RemoveWarp
point -
containsWarp
Check forWarp
exist by name. -
getDefaultHome
Gets defaultHome
point. -
getHome
Gets defaultHome
point. -
getWarp
GetWarp
whith 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()
-