public class PlayerConfigurationUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static WauzCore |
core
A direct reference to the main class.
|
Constructor and Description |
---|
PlayerConfigurationUtils() |
Modifier and Type | Method and Description |
---|---|
private static java.io.File |
getPlayerDataFile(org.bukkit.OfflinePlayer player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets either the global or a character specific config file for an offline player.
|
private static java.io.File |
getPlayerDataFile(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets either the global or a character specific config file for a player.
|
protected static java.lang.Boolean |
playerConfigGetBoolean(org.bukkit.OfflinePlayer player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a boolean from a player config.
|
protected static java.lang.Boolean |
playerConfigGetBoolean(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a boolean from a player config.
|
protected static java.lang.Double |
playerConfigGetDouble(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a double from a player config.
|
protected static java.lang.Integer |
playerConfigGetInt(org.bukkit.OfflinePlayer player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets an int from a player config.
|
protected static java.lang.Integer |
playerConfigGetInt(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets an int from a player config.
|
protected static org.bukkit.inventory.ItemStack[] |
playerConfigGetItemStacks(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets an item stack array from a player config.
|
protected static org.bukkit.Location |
playerConfigGetLocation(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a location from a player config.
|
protected static java.lang.Long |
playerConfigGetLong(org.bukkit.OfflinePlayer player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a long from a player config.
|
protected static java.lang.Long |
playerConfigGetLong(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a long from a player config.
|
protected static java.lang.String |
playerConfigGetString(org.bukkit.OfflinePlayer player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a string from a player config.
|
protected static java.lang.String |
playerConfigGetString(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a string from a player config.
|
protected static java.util.List<java.lang.String> |
playerConfigGetStringList(org.bukkit.OfflinePlayer player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a string list from a player config.
|
protected static java.util.List<java.lang.String> |
playerConfigGetStringList(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Boolean characterSpecific)
Gets a string list from a player config.
|
protected static void |
playerConfigSet(org.bukkit.OfflinePlayer player,
java.lang.String path,
java.lang.Object value,
java.lang.Boolean characterSpecific)
Sets the given value in the player config.
|
protected static void |
playerConfigSet(org.bukkit.entity.Player player,
java.lang.String path,
java.lang.Object value,
java.lang.Boolean characterSpecific)
Sets the given value in the player config.
|
(package private) static java.lang.String |
trimPlayerDataPath(java.lang.String path)
Trims the given path to not contain character slots.
|
private static WauzCore core
private static java.io.File getPlayerDataFile(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of a value. (May start with character slot, if not character specific)characterSpecific
- If the character specific file should be used.WauzPlayerDataSectionSelections.getSelectedCharacterSlot()
private static java.io.File getPlayerDataFile(org.bukkit.OfflinePlayer player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of a value. (May start with character slot, if not character specific)characterSpecific
- If the character specific file should be used. (Will not work here)static java.lang.String trimPlayerDataPath(java.lang.String path)
path
- The path with character slot.protected static void playerConfigSet(org.bukkit.entity.Player player, java.lang.String path, java.lang.Object value, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to set.value
- The value to set.characterSpecific
- If the character specific file should be used.protected static void playerConfigSet(org.bukkit.OfflinePlayer player, java.lang.String path, java.lang.Object value, java.lang.Boolean characterSpecific)
player
- The offline player that owns the config file.path
- The key path of the value to set.value
- The value to set.characterSpecific
- If the character specific file should be used.protected static java.lang.String playerConfigGetString(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.lang.String playerConfigGetString(org.bukkit.OfflinePlayer player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The offline player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.util.List<java.lang.String> playerConfigGetStringList(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.util.List<java.lang.String> playerConfigGetStringList(org.bukkit.OfflinePlayer player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The offline player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.lang.Integer playerConfigGetInt(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.lang.Integer playerConfigGetInt(org.bukkit.OfflinePlayer player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.lang.Long playerConfigGetLong(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.lang.Long playerConfigGetLong(org.bukkit.OfflinePlayer player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- offline The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.lang.Double playerConfigGetDouble(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.lang.Boolean playerConfigGetBoolean(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static java.lang.Boolean playerConfigGetBoolean(org.bukkit.OfflinePlayer player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The offline player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static org.bukkit.Location playerConfigGetLocation(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.protected static org.bukkit.inventory.ItemStack[] playerConfigGetItemStacks(org.bukkit.entity.Player player, java.lang.String path, java.lang.Boolean characterSpecific)
player
- The player that owns the config file.path
- The key path of the value to get.characterSpecific
- If the character specific file should be used.