Class BlockBucket

java.lang.Object
com.plotsquared.core.plot.BlockBucket
All Implemented Interfaces:
ConfigurationSerializable

public final class BlockBucket extends Object implements ConfigurationSerializable
A block bucket is a container of block types, where each block has a specified chance of being randomly picked
  • Constructor Details

    • BlockBucket

      public BlockBucket(@NonNull com.sk89q.worldedit.world.block.BlockType type)
    • BlockBucket

      public BlockBucket(@NonNull com.sk89q.worldedit.world.block.BlockState state)
    • BlockBucket

      public BlockBucket(@NonNull String input)
    • BlockBucket

      public BlockBucket()
  • Method Details

    • withSingle

      public static BlockBucket withSingle(@NonNull com.sk89q.worldedit.world.block.BlockState block)
    • deserialize

      public static BlockBucket deserialize(@NonNull Map<String,​Object> map)
    • addBlock

      public void addBlock(@NonNull com.sk89q.worldedit.world.block.BlockState block)
    • addBlock

      public void addBlock(@NonNull com.sk89q.worldedit.world.block.BlockState block, int chance)
    • isEmpty

      public boolean isEmpty()
    • compile

      public void compile()
    • isCompiled

      public boolean isCompiled()
    • toPattern

      public com.sk89q.worldedit.function.pattern.Pattern toPattern()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isAir

      public boolean isAir()
    • serialize

      public Map<String,​Object> serialize()
      Description copied from interface: ConfigurationSerializable
      Creates a Map representation of this class.

      This class must provide a method to restore this class, as defined in the ConfigurationSerializable interface javadoc.

      Specified by:
      serialize in interface ConfigurationSerializable
      Returns:
      Map containing the current state of this class
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object