public class User
extends java.lang.Object
Constructor and Description |
---|
User(java.lang.String UUID,
Configuration config)
Creates a user instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addMoney(double money)
Adds money to a user's balance.
|
void |
addPastKingdom(KingdomLog kingdomLog)
Add past kingdom to this user's kingdom log
|
void |
addPastProfession(Profession p)
Add a profession to a user's past professions.
|
boolean |
canHome() |
boolean |
canShield() |
void |
effectAttributes()
Makes attributes for the user take effect if they are online.
|
void |
effectProfessionData()
Updates the profession data config with this user's new profession.
|
void |
effectReputation(int int1,
java.lang.String reason)
Change a user's reputation.
|
double |
getBalance()
Get a user's balance.
|
byte |
getChat()
Check if this user is using kingdom chat, ally chat, or normal chat
|
Configuration |
getConfig()
Get the config for this user
|
Kingdom |
getCurrentKingdom()
Get this user's current kingdom.
|
long |
getFirstJoinTime()
Get the time when a user first joined.
|
java.lang.String |
getKingdomUUID()
Get the player's kingdom uuid.
|
long |
getLastLandMessage()
Get this user's last land message.
|
long |
getLastOnline()
Get when this user was last online.
|
java.lang.String |
getLastTrack()
Gets the uuid of the user which this user previously tracked with a tracker.
|
Attributes |
getLuck()
Get a user's luck
|
java.lang.String |
getName()
Gets user's name
|
OnlineTime |
getOnlineTime()
Gets this users @OnlineTime
|
java.util.ArrayList<KingdomLog> |
getPastKingdoms()
Get this user's kingdom log.
|
java.util.ArrayList<Profession> |
getPastProfessions()
Get a list of a user's past professions.
|
org.bukkit.entity.Player |
getPlayer()
Get the user's player.
|
Profession |
getProfession()
Get a user's profession.
|
int |
getReputation()
Gets reputation
|
Attributes |
getSpeed()
Get a user's speed.
|
Attributes |
getStamina()
Get a user's stamina
|
double |
getStaminaDamage()
Gets this user's stamina damage multiplier.
|
Attributes |
getStrength()
Gets a user's strength.
|
int |
getTotalAtt()
Get all attribute levels added together.
|
Attributes |
getToughness()
Gets a user's toughness.
|
java.lang.String |
getUUID()
Get a user's uuid
|
void |
loadPermissions() |
void |
regenStamina()
This is called to regen the damage multiplier effected by stamina.
|
void |
removeMoney(double money)
Removes money from a user's balance.
|
void |
save()
Saves a user.
|
void |
sendOfflineMessage(java.lang.String string)
Sends this user a message which they will get the next time they join.
|
void |
setChat(byte chat)
Sets this user to using kingdom chat or ally chat.
|
void |
setCurrentKingdom(Kingdom k)
Sets a player's current kingdom.
|
static void |
setDefaults(org.bukkit.entity.Player player,
Configuration config)
Sets a players's config as default.
|
void |
setHome(boolean b) |
void |
setKingdomUUID(java.lang.String uuid)
Sets a player's kingdom uuid.
|
void |
setLastLandMessage(long currentTimeMillis)
Sets this user's last land message.
|
void |
setLastTrack(java.lang.String uuid)
Sets the uuid of the user which this user previously tracked with a tracker.
|
void |
setLuck(Attributes luck)
Set a user's luck
|
void |
setProfession(Profession profession2)
Set a user's profession
|
void |
setShield(int i) |
void |
setSpeed(Attributes speed)
Set a user's speed
|
void |
setStamina(Attributes stamina)
Set a user's stamina
|
void |
setStrength(Attributes strength)
Set a user's strength
|
void |
setToughness(Attributes toughness)
Set a user's toughness
|
java.lang.String |
shieldCooldown() |
void |
staminaHit()
Decrease damage % accordingly based on stamina level.
|
void |
syncBalance()
Syncs balance with vault.
|
void |
unloadPermissions() |
public User(java.lang.String UUID, Configuration config)
UUID
- config
- public void syncBalance()
public void addMoney(double money)
money
- public void removeMoney(double money)
money
- public void save()
public static void setDefaults(org.bukkit.entity.Player player, Configuration config)
player
- config
- public Profession getProfession()
public Attributes getStrength()
public Attributes getToughness()
public Attributes getSpeed()
public Attributes getStamina()
public Attributes getLuck()
public void setProfession(Profession profession2)
profession2
- public void setStrength(Attributes strength)
strength
- public void setToughness(Attributes toughness)
toughness
- public void setSpeed(Attributes speed)
speed
- public void setStamina(Attributes stamina)
stamina
- public void setLuck(Attributes luck)
luck
- public org.bukkit.entity.Player getPlayer()
public java.lang.String getUUID()
public double getBalance()
public void effectAttributes()
public java.util.ArrayList<Profession> getPastProfessions()
public void addPastProfession(Profession p)
p
- public void effectProfessionData()
public java.lang.String getName()
public int getReputation()
public Configuration getConfig()
public java.lang.String getKingdomUUID()
public void setKingdomUUID(java.lang.String uuid)
uuid
- public void addPastKingdom(KingdomLog kingdomLog)
kingdomLog
- public java.util.ArrayList<KingdomLog> getPastKingdoms()
public OnlineTime getOnlineTime()
public long getLastOnline()
public long getFirstJoinTime()
public void effectReputation(int int1, java.lang.String reason)
int1
- reason
- public void sendOfflineMessage(java.lang.String string)
string
- public Kingdom getCurrentKingdom()
public void setCurrentKingdom(Kingdom k)
k
- public long getLastLandMessage()
public void setLastLandMessage(long currentTimeMillis)
currentTimeMillis
- public byte getChat()
public void setChat(byte chat)
chat
- public int getTotalAtt()
public void staminaHit()
public void regenStamina()
public double getStaminaDamage()
public java.lang.String getLastTrack()
public void setLastTrack(java.lang.String uuid)
uuid
- public void setShield(int i)
public boolean canShield()
public java.lang.String shieldCooldown()
public void setHome(boolean b)
public boolean canHome()
public void unloadPermissions()
public void loadPermissions()