Class Tags

java.lang.Object
valorless.rarespawns.utils.Tags

public class Tags extends Object
Tags utility class for working with PersistentDataContainers.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    static Boolean
    Has(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key)
    Checks if a key exists in the PersistentDataContainer.
    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.
    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.
    static Boolean
    Remove(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key)
     
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static Boolean Remove(org.bukkit.plugin.java.JavaPlugin caller, org.bukkit.inventory.ItemStack item, String key)
    • 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.