Package valorless.rarespawns.utils
Class Tags
java.lang.Object
valorless.rarespawns.utils.Tags
Tags utility class for working with PersistentDataContainers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectGet(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, valorless.valorlessutils.tags.TagType type) Gets a value from the PersistentDataContainer using a specific key.static ObjectGet(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.persistence.PersistentDataContainer container, String key, valorless.valorlessutils.tags.TagType type) Gets a value from the PersistentDataContainer using a specific key.static BooleanGetBoolean(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Boolean value from the PersistentDataContainer using a specific key.static DoubleGetDouble(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Double value from the PersistentDataContainer using a specific key.GetDoubleList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Double List value from the PersistentDataContainer using a specific key.static FloatGets a Float value from the PersistentDataContainer using a specific key.GetFloatList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Float List value from the PersistentDataContainer using a specific key.static IntegerGetInteger(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets an Integer value from the PersistentDataContainer using a specific key.GetIntegerList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Integer List value from the PersistentDataContainer using a specific key.static StringGetString(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a String value from the PersistentDataContainer using a specific key.GetStringList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a String List value from the PersistentDataContainer using a specific key.static BooleanChecks if a key exists in the PersistentDataContainer.static BooleanHas(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, valorless.valorlessutils.tags.TagType type) Checks if a key exists in the PersistentDataContainer.static BooleanHas(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.persistence.PersistentDataContainer container, String key, valorless.valorlessutils.tags.TagType type) Checks if a key exists in the PersistentDataContainer.static Booleanstatic voidSet(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Object value, valorless.valorlessutils.tags.TagType type) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSet(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.persistence.PersistentDataContainer container, String key, Object value, valorless.valorlessutils.tags.TagType type) Sets a value in the PersistentDataContainer using a specific key.static voidSetBoolean(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Boolean value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSetDouble(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Double value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSetDoubleList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, List<Double> value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSetFloat(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Float value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSetFloatList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, List<Float> value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSetInteger(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Integer value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSetIntegerList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, List<Integer> value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSetString(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, String value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.static voidSetStringList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, List<String> value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.
-
Constructor Details
-
Tags
public Tags()
-
-
Method Details
-
SetString
public static void SetString(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, String value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
SetStringList
public static void SetStringList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, List<String> value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
SetInteger
public static void SetInteger(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Integer value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
SetIntegerList
public static void SetIntegerList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, List<Integer> value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
SetDouble
public static void SetDouble(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Double value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
SetDoubleList
public static void SetDoubleList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, List<Double> value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
SetFloat
public static void SetFloat(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Float value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
SetFloatList
public static void SetFloatList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, List<Float> value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
SetBoolean
public static void SetBoolean(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Boolean value) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.
-
GetString
public static String GetString(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a String value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved String value, or null if not present.
-
GetStringList
public static List<String> GetStringList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a String List value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved String List value, or null if not present.
-
GetInteger
public static Integer GetInteger(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets an Integer value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved Integer value, or null if not present.
-
GetIntegerList
public static List<Integer> GetIntegerList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Integer List value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved Integer List value, or null if not present.
-
GetDouble
public static Double GetDouble(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Double value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved Double value, or null if not present.
-
GetDoubleList
public static List<Double> GetDoubleList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Double List value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved Double List value, or null if not present.
-
GetFloat
public static Float GetFloat(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Float value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved Float value, or null if not present.
-
GetFloatList
public static List<Float> GetFloatList(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Float List value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved Float List value, or null if not present.
-
GetBoolean
public static Boolean GetBoolean(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Gets a Boolean value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve the value from.key- The key to retrieve.- Returns:
- The retrieved Boolean value, or null if not present.
-
Set
public static void Set(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, Object value, valorless.valorlessutils.tags.TagType type) Sets a value in the PersistentDataContainer using a specific key.
Use before or after setting metadata.- Parameters:
caller- The calling plugin.item- ItemStack to modify.key- The key to set.value- The value to set.type- The TagType.
-
Get
public static Object Get(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, valorless.valorlessutils.tags.TagType type) Gets a value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.item- ItemStack to retrieve from.key- The key to retrieve.type- The TagType.- Returns:
- The retrieved value.
-
Has
public static Boolean Has(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key, valorless.valorlessutils.tags.TagType type) Checks if a key exists in the PersistentDataContainer.- Parameters:
caller- The calling plugin.item- ItemStack to check.key- The key to check.type- The TagType.- Returns:
- true if the key exists, false otherwise.
-
Has
public static Boolean Has(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key) Checks if a key exists in the PersistentDataContainer.- Parameters:
caller- The calling plugin.item- ItemStack to check.key- The key to check.- Returns:
- true if the key exists, false otherwise.
-
Remove
-
Set
public static void Set(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.persistence.PersistentDataContainer container, String key, Object value, valorless.valorlessutils.tags.TagType type) Sets a value in the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.container- The PersistentDataContainer to modify.key- The key to set.value- The value to set.type- The TagType.
-
Get
public static Object Get(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.persistence.PersistentDataContainer container, String key, valorless.valorlessutils.tags.TagType type) Gets a value from the PersistentDataContainer using a specific key.- Parameters:
caller- The calling plugin.container- The PersistentDataContainer to retrieve from.key- The key to retrieve.type- The TagType.- Returns:
- The retrieved value.
-
Has
public static Boolean Has(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.persistence.PersistentDataContainer container, String key, valorless.valorlessutils.tags.TagType type) Checks if a key exists in the PersistentDataContainer.- Parameters:
caller- The calling plugin.container- The PersistentDataContainer to check.key- The key to check.type- The TagType.- Returns:
- true if the key exists, false otherwise.
-