Class ItemStackProvider

java.lang.Object
org.bukkit.inventory.ItemStack
wbs.utils.util.particles.data.ItemStackProvider
All Implemented Interfaces:
Cloneable, org.bukkit.configuration.serialization.ConfigurationSerializable, Provider, Refreshable

@Beta public class ItemStackProvider extends org.bukkit.inventory.ItemStack implements Provider
Provider that extends ItemStack for the purpose of allowing particle data to be refreshed and written to a config.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ItemStackProvider(List<org.bukkit.Material> data)
     
    ItemStackProvider(org.bukkit.configuration.ConfigurationSection section, String path)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Refreshes this object, whatever that means for a given implementation - typically an internal value that may be retrieved over time, but not necessarily.
    void
    writeToConfig(org.bukkit.configuration.ConfigurationSection section, String path)
    Save this provider in a config (that can often by read by its constructor)

    Methods inherited from class org.bukkit.inventory.ItemStack

    addEnchantment, addEnchantments, addUnsafeEnchantment, addUnsafeEnchantments, clone, containsEnchantment, deserialize, equals, getAmount, getData, getDurability, getEnchantmentLevel, getEnchantments, getItemMeta, getMaxStackSize, getType, hashCode, hasItemMeta, isSimilar, removeEnchantment, serialize, setAmount, setData, setDurability, setItemMeta, setType, toString

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ItemStackProvider

      public ItemStackProvider(List<org.bukkit.Material> data)
      Parameters:
      data - The Materials to be iterated over.
    • ItemStackProvider

      public ItemStackProvider(org.bukkit.configuration.ConfigurationSection section, String path) throws InvalidConfigurationException
      Parameters:
      section - The config to read from.
      path - The path within the given config section to read from.
      Throws:
      InvalidConfigurationException - If the config is misconfigured in an unrecoverable way.
  • Method Details

    • writeToConfig

      public void writeToConfig(org.bukkit.configuration.ConfigurationSection section, String path)
      Description copied from interface: Provider
      Save this provider in a config (that can often by read by its constructor)
      Specified by:
      writeToConfig in interface Provider
      Parameters:
      section - The section to write to
      path - The field/path inside the given section
    • refresh

      public void refresh()
      Description copied from interface: Refreshable
      Refreshes this object, whatever that means for a given implementation - typically an internal value that may be retrieved over time, but not necessarily.
      Specified by:
      refresh in interface Refreshable