Package wbs.utils.util.particles.data
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
Provider that extends
ItemStack for the purpose of allowing
particle data to be refreshed and written to a config.-
Constructor Summary
ConstructorsConstructorDescriptionItemStackProvider(List<org.bukkit.Material> data) ItemStackProvider(org.bukkit.configuration.ConfigurationSection section, String path) -
Method Summary
Modifier and TypeMethodDescriptionvoidrefresh()Refreshes this object, whatever that means for a given implementation - typically an internal value that may be retrieved over time, but not necessarily.voidwriteToConfig(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
-
Constructor Details
-
ItemStackProvider
- Parameters:
data- TheMaterials 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
Description copied from interface:ProviderSave this provider in a config (that can often by read by its constructor)- Specified by:
writeToConfigin interfaceProvider- Parameters:
section- The section to write topath- The field/path inside the given section
-
refresh
public void refresh()Description copied from interface:RefreshableRefreshes this object, whatever that means for a given implementation - typically an internal value that may be retrieved over time, but not necessarily.- Specified by:
refreshin interfaceRefreshable
-