Package wbs.utils.util.particles.data
Class DustOptionsProvider
java.lang.Object
org.bukkit.Particle.DustOptions
wbs.utils.util.particles.data.DustOptionsProvider
- All Implemented Interfaces:
Provider,Refreshable
Provider that implements
Particle.DustOptions for the purpose of allowing
particle data to be refreshed and written to a config.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDetermines how theVectorProvideris treated as a colour -
Constructor Summary
ConstructorsConstructorDescriptionDustOptionsProvider(@NotNull VectorProvider colourProvider, NumProvider sizeProvider, DustOptionsProvider.ColourType type) DustOptionsProvider(org.bukkit.configuration.ConfigurationSection section, String path, WbsSettings settings, String directory) DustOptionsProvider(VectorProvider colourProvider, float size, DustOptionsProvider.ColourType type) -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.ColorgetColor()floatgetSize()voidrefresh()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)
-
Constructor Details
-
DustOptionsProvider
public DustOptionsProvider(@NotNull @NotNull VectorProvider colourProvider, NumProvider sizeProvider, DustOptionsProvider.ColourType type) - Parameters:
colourProvider- A vector provider that represents a colour, stored in format defined byDustOptionsProvider.ColourType.sizeProvider- A number provider to represent the size of the redstone dust, between 0 (exclusive) and 2 (inclusive).type- The format of the colour vector.- See Also:
-
DustOptionsProvider
public DustOptionsProvider(VectorProvider colourProvider, float size, DustOptionsProvider.ColourType type) - Parameters:
colourProvider- A vector provider that represents a colour, stored in format defined byDustOptionsProvider.ColourType.size- A number to represent the size of the redstone dust, between 0 (exclusive) and 2 (inclusive).type- The format of the colour vector.- See Also:
-
DustOptionsProvider
public DustOptionsProvider(org.bukkit.configuration.ConfigurationSection section, String path, WbsSettings settings, String directory) throws InvalidConfigurationException - Parameters:
section- The config to read from.path- The path within the given config section to read from.settings- The settings for logging purposes.directory- The path taken so far, for logging purposes.- Throws:
InvalidConfigurationException- If the config is misconfigured in an unrecoverable way.
-
-
Method Details
-
getColor
@NotNull public @NotNull org.bukkit.Color getColor()- Overrides:
getColorin classorg.bukkit.Particle.DustOptions
-
getSize
public float getSize()- Overrides:
getSizein classorg.bukkit.Particle.DustOptions
-
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
-
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
-