Developers/PlayerConfig
Usage:
Get player configuration:
To get the configuration based on the player name, if the player does not exist the function will return null
LinkMain.getPlayerConfig(String player)
To get the player configuration
LinkMain.getPlayerConfig(Player player)
Usage player configuration:
Get the player's total cash
public int getCash()
Checks if the player has accepted the rules of the server "If the server is using the rules"
public boolean AcceptedRules()
Get the player's strikes
public Strikes getStrikes()
Get the history of names the player used on the server
public List<String> usedNames()
Get the type of player: Staff, Default, Vip
public PlayerType getType()
Adds a cash player amount
public void addCash(int quanty)
Take an amount of the player's cash
public void takeCash(int quanty)
Defines the player's cash
public void setCash(int quanty)
Whether or not the player has accepted the rules
public void setAcceptedRules(boolean value)
Used to change player strikes
public void setStrikes(Strikes strikes)
Used to set an external configuration in the player configuration
public void setExConfig(String path, Object value)
To pick up Object in player setup
public Object getExConfig(String path)
To pick up String in player setup
public String getExString(String path)
To pick up int in player setup
public int getExInt(String path)
To pick up List<?> in player setup
public List<?> getExList(String path)
To pick up Location in player setup
public Location getExLocation(String path, boolean getYP) throws RuntimeException;
To pick up ItemStack in player setup
public ItemStack getExItemStack(String path) throws RuntimeException;
Defines the type of player: Staff, Default, Vip
public void setType(PlayerType type);
Used when the player enters the server, to create a configuration file if he does not have
public void createDefaultConfig();
Checks if the player has any default settings
public boolean contains(ConfigType type);
Used to set pick up or check player settings
public enum ConfigType {
Strikes, PlayerType, AcceptedRules, UseNames, Cash
}