public class PSPlayer extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PSPlayer.PlayerRegionRelationship |
| Constructor and Description |
|---|
PSPlayer(org.bukkit.entity.Player player) |
PSPlayer(UUID uuid) |
| Modifier and Type | Method and Description |
|---|---|
net.milkbowl.vault.economy.EconomyResponse |
depositBalance(double amount)
Add a certain amount to the player's bank account.
|
static PSPlayer |
fromPlayer(org.bukkit.OfflinePlayer p) |
static PSPlayer |
fromPlayer(org.bukkit.entity.Player p)
Adapt a Bukkit player into a PSPlayer wrapper.
|
static PSPlayer |
fromUUID(UUID uuid)
Adapt a UUID into a PSPlayer wrapper.
|
double |
getBalance()
Get the player's balance.
|
int |
getGlobalRegionLimits()
Get a player's total protection limit from permission (protectionstones.limit.x)
If there is no attached Player object to this PSPlayer, and LuckPerms is not enabled, this throws a CannotAccessOfflinePlayerPermissionsException.
|
List<PSRegion> |
getHomes(org.bukkit.World w)
Get the list of homes a player owns.
|
String |
getName() |
org.bukkit.OfflinePlayer |
getOfflinePlayer()
Get the wrapped Bukkit offline player.
|
org.bukkit.entity.Player |
getPlayer()
Get the wrapped Bukkit player.
|
List<PSRegion> |
getPSRegions(org.bukkit.World w,
boolean canBeMember)
Get the list of regions that a player owns, or is a member of.
|
List<PSRegion> |
getPSRegionsCrossWorld(org.bukkit.World w,
boolean canBeMember)
Get the list of regions that a player owns, or is a member of.
|
HashMap<PSProtectBlock,Integer> |
getRegionLimits()
Get a player's permission limits for each protection block (protectionstones.limit.alias.x)
Protection blocks that aren't specified in the player's permissions will not be returned in the map.
|
List<PSRegion> |
getTaxEligibleRegions()
Get the list of regions that a player can pay money for taxes to.
|
UUID |
getUuid()
Get the wrapped player's uuid.
|
boolean |
hasAmount(double amount)
Get if the player has a certain amount of money.
|
void |
pay(PSPlayer payee,
double amount)
Pay another player a certain amount of money.
|
net.milkbowl.vault.economy.EconomyResponse |
withdrawBalance(double amount)
Withdraw a certain amount from the player's bank account.
|
public PSPlayer(org.bukkit.entity.Player player)
public PSPlayer(UUID uuid)
public static PSPlayer fromUUID(UUID uuid)
uuid - the uuid to wrappublic static PSPlayer fromPlayer(org.bukkit.entity.Player p)
p - the player to wrappublic static PSPlayer fromPlayer(org.bukkit.OfflinePlayer p)
public UUID getUuid()
public org.bukkit.entity.Player getPlayer()
public org.bukkit.OfflinePlayer getOfflinePlayer()
public String getName()
public boolean hasAmount(double amount)
amount - the amount to checkpublic double getBalance()
public net.milkbowl.vault.economy.EconomyResponse depositBalance(double amount)
amount - the amount to addEconomyResponse that is given by Vaultpublic net.milkbowl.vault.economy.EconomyResponse withdrawBalance(double amount)
amount - the amount to withdrawEconomyResponse that is given by Vaultpublic void pay(PSPlayer payee, double amount)
payee - the player to payamount - the amount to paypublic HashMap<PSProtectBlock,Integer> getRegionLimits()
public int getGlobalRegionLimits()
public List<PSRegion> getTaxEligibleRegions()
public List<PSRegion> getPSRegions(org.bukkit.World w, boolean canBeMember)
w - world to search for regions incanBeMember - whether or not to add regions where the player is a member, not ownerpublic List<PSRegion> getPSRegionsCrossWorld(org.bukkit.World w, boolean canBeMember)
w - world to search for regions incanBeMember - whether or not to add regions where the player is a member, not ownerpublic List<PSRegion> getHomes(org.bukkit.World w)
w - world to search for regions inCopyright © 2021. All rights reserved.