Class WPlayer
java.lang.Object
com.olziedev.playerwarps.api.player.WPlayer
Handles and manages all the player data.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFavouriteWarps
(CommandSender sender) abstract WGUIPlayer
abstract String
abstract long
getLogs()
abstract long
abstract double
abstract double
abstract String
getName()
abstract OfflinePlayer
abstract Warp
abstract Player
getPlayerWarps
(boolean showLocked, CommandSender sender) abstract String
abstract int
abstract double
abstract Long
abstract long
abstract long
getUsedWarps
(CommandSender sender) abstract UUID
getUUID()
getVisitedWarps
(CommandSender sender) abstract int
getWarps
(boolean showLocked) abstract void
manageMessage
(String message, boolean add) Add or remove an offline message from a player.abstract void
Purge the players warps if they have gone over their warp limit.abstract void
Update the player's name for, called when joined.abstract void
setEarnedRateRewards
(List<String> earnedRateRewards) Modifies the list of all the earned rate rewards for this player.abstract void
setFavouriteWarps
(List<Warp> favouriteWarps) Modifies the list of favourite warps for this player.abstract void
setLanguage
(String language) Modifies the language the player will receive messages in.abstract void
setLastPlayed
(Long time) Modifies the last time a player last logged offline.abstract void
Modifies the logged actions for this player.abstract void
setPendingWarp
(Warp playerWarp, Runnable expire) Modifies the pending warp that the player will teleport to on another server.abstract void
setSetPrice
(double setPrice) Modifies the warp price to create a warp for a player.abstract void
setSponsorCooldown
(Long sponsorCooldown, boolean change) Modifies the sponsor cooldown for the player.abstract void
setStaticWarps
(long addedWarps) Modifies the static maximum warps a player can set.abstract void
setVisitedWarps
(List<Warp> visitedWarps) Modifies the list of recently visited warps for this player.
-
Constructor Details
-
WPlayer
public WPlayer()
-
-
Method Details
-
getUUID
- Returns:
- The UUID of the warp player.
-
getName
- Returns:
- The last known warp player's name.
-
getPlayer
- Returns:
- The Bukkit player instance.
-
getOfflinePlayer
- Returns:
- The Bukkit offline player instance.
-
getWarps
- Parameters:
showLocked
- Add locked warps to the list.- Returns:
- List of the warps owned by the player.
-
getPlayerWarps
- Parameters:
showLocked
- Add locked warps to the list.sender
- The command sender, this is to check if they can see specific warps or not.- Returns:
- List of the warps owned by the player.
-
getUsedWarps
- Parameters:
sender
- The command sender to check if they can see specific warps or not.- Returns:
- The current warps the player has.
-
getMaximumWarps
public abstract long getMaximumWarps()- Returns:
- The maximum amount of warps a player can set. Retrieves it from the permission or static amount.
-
getPrettyMaximumWarps
- Returns:
- The pretty maximum amount of warps a player can set. Retrieves it from the permission or static amount.
-
getStaticWarps
public abstract long getStaticWarps()- Returns:
- The static amount of warps a player can set.
-
getLastPlayed
public abstract long getLastPlayed()- Returns:
- When the player last logged offline.
-
setLastPlayed
Modifies the last time a player last logged offline.- Parameters:
time
- Last logged offline in milliseconds.
-
getPendingWarp
- Returns:
- The warp that the player is teleporting to on another server.
-
setPendingWarp
Modifies the pending warp that the player will teleport to on another server.- Parameters:
playerWarp
- Pending warp to teleport to.expire
- The runnable for when the pending eatp expires.
-
getSponsorCooldown
- Returns:
- The cooldown for sponsoring a warp. (in milliseconds or null if no cooldown.)
-
setSponsorCooldown
Modifies the sponsor cooldown for the player.- Parameters:
sponsorCooldown
- Sponsor cooldown in milliseconds.change
- If the cooldown should persist.
-
getVisitedWarps
- Parameters:
sender
- The command sender to check if they can see specific warps or not.- Returns:
- List of warps the player has recently visited.
-
setVisitedWarps
Modifies the list of recently visited warps for this player.- Parameters:
visitedWarps
- List of visited warps.
-
getFavouriteWarps
- Parameters:
sender
- The command sender to check if they can see specific warps or not.- Returns:
- List of warps the player has listed as a favourite.
-
setFavouriteWarps
Modifies the list of favourite warps for this player.- Parameters:
favouriteWarps
- List of favourite warps.
-
getMessages
- Returns:
- List of pending offline messages the player has.
-
manageMessage
Add or remove an offline message from a player.- Parameters:
message
- The offline message the player should see when joined.add
- Add a message or remove a message?
-
getLogs
- Returns:
- List of the logged actions.
-
setLogs
Modifies the logged actions for this player.- Parameters:
logs
- Logged actions.
-
getGUIPlayer
- Returns:
- The GUIPlayer object, used for saving values when a GUI is opened.
-
refreshName
public abstract void refreshName()Update the player's name for, called when joined.getName()
-
purgeLimit
public abstract void purgeLimit()Purge the players warps if they have gone over their warp limit. -
setStaticWarps
public abstract void setStaticWarps(long addedWarps) Modifies the static maximum warps a player can set.- Parameters:
addedWarps
- Static maximum amount of warps.
-
getSetPrice
public abstract double getSetPrice()- Returns:
- How much they will be charged when setting a warp.
-
setSetPrice
public abstract void setSetPrice(double setPrice) Modifies the warp price to create a warp for a player. (Doesn't persist!)- Parameters:
setPrice
- Price to create a warp.
-
getMaxWarpCostPrice
public abstract double getMaxWarpCostPrice()- Returns:
- The maximum warp teleport cost.
-
getMinWarpCostPrice
public abstract double getMinWarpCostPrice()- Returns:
- The minimum warp teleport cost.
-
getPriceFreeLimit
public abstract int getPriceFreeLimit()- Returns:
- The amount of warps a player can set for free.
-
getWaitTeleportTime
public abstract int getWaitTeleportTime()- Returns:
- The wait time in seconds to teleport to a warp.
-
getLanguage
- Returns:
- The language the player will receive messages in.
-
setLanguage
Modifies the language the player will receive messages in.- Parameters:
language
- The language that the plugin supports.
-
getEarnedRateRewards
- Returns:
- The list of all the earned rate rewards for this player.
-
setEarnedRateRewards
Modifies the list of all the earned rate rewards for this player.- Parameters:
earnedRateRewards
- List of all the earned rate rewards.
-