Package com.plotsquared.core.plot
Class BlockBucket
java.lang.Object
com.plotsquared.core.plot.BlockBucket
- All Implemented Interfaces:
ConfigurationSerializable
A block bucket is a container of block types, where each block
has a specified chance of being randomly picked
-
Constructor Summary
ConstructorDescriptionBlockBucket(@NonNull com.sk89q.worldedit.world.block.BlockState state)
BlockBucket(@NonNull com.sk89q.worldedit.world.block.BlockType type)
BlockBucket(@NonNull String input)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBlock(@NonNull com.sk89q.worldedit.world.block.BlockState block)
void
addBlock(@NonNull com.sk89q.worldedit.world.block.BlockState block, int chance)
void
compile()
static BlockBucket
deserialize(@NonNull Map<String,Object> map)
boolean
int
hashCode()
boolean
isAir()
boolean
boolean
isEmpty()
Creates a Map representation of this class.com.sk89q.worldedit.function.pattern.Pattern
toString()
static BlockBucket
withSingle(@NonNull com.sk89q.worldedit.world.block.BlockState block)
-
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
-
BlockBucket
public BlockBucket()
-
-
Method Details
-
withSingle
-
deserialize
-
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
-
isAir
public boolean isAir() -
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 interfaceConfigurationSerializable
- Returns:
- Map containing the current state of this class
-
equals
-
hashCode
public int hashCode()
-