Class BlockDataProvider

java.lang.Object
wbs.utils.util.particles.data.BlockDataProvider
All Implemented Interfaces:
Cloneable, org.bukkit.block.data.BlockData, Provider, Refreshable

@Beta public class BlockDataProvider extends Object implements org.bukkit.block.data.BlockData, Provider
Provider that implements BlockData for the purpose of allowing particle data to be refreshed and written to a config.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockDataProvider(Collection<org.bukkit.block.data.BlockData> data)
     
    BlockDataProvider(org.bukkit.configuration.ConfigurationSection section, String path)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.bukkit.block.data.BlockData
     
    @NotNull String
     
    @NotNull String
    getAsString(boolean b)
     
    @NotNull org.bukkit.Material
     
    @NotNull org.bukkit.SoundGroup
     
    boolean
    matches(@Nullable org.bukkit.block.data.BlockData blockData)
     
    @NotNull org.bukkit.block.data.BlockData
    merge(@NotNull org.bukkit.block.data.BlockData blockData)
     
    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 java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BlockDataProvider

      public BlockDataProvider(Collection<org.bukkit.block.data.BlockData> data)
    • BlockDataProvider

      public BlockDataProvider(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

    • 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
    • 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
    • getMaterial

      @NotNull public @NotNull org.bukkit.Material getMaterial()
      Specified by:
      getMaterial in interface org.bukkit.block.data.BlockData
    • getAsString

      @NotNull public @NotNull String getAsString()
      Specified by:
      getAsString in interface org.bukkit.block.data.BlockData
    • getAsString

      @NotNull public @NotNull String getAsString(boolean b)
      Specified by:
      getAsString in interface org.bukkit.block.data.BlockData
    • merge

      @NotNull public @NotNull org.bukkit.block.data.BlockData merge(@NotNull @NotNull org.bukkit.block.data.BlockData blockData)
      Specified by:
      merge in interface org.bukkit.block.data.BlockData
    • matches

      public boolean matches(@Nullable @Nullable org.bukkit.block.data.BlockData blockData)
      Specified by:
      matches in interface org.bukkit.block.data.BlockData
    • clone

      @NotNull public @NotNull org.bukkit.block.data.BlockData clone()
      Specified by:
      clone in interface org.bukkit.block.data.BlockData
      Overrides:
      clone in class Object
    • getSoundGroup

      @NotNull public @NotNull org.bukkit.SoundGroup getSoundGroup()
      Specified by:
      getSoundGroup in interface org.bukkit.block.data.BlockData