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
ConstructorsConstructorDescriptionBlockBucket
(@NonNull BlockState state) BlockBucket
(@NonNull BlockType type) BlockBucket
(@NonNull String input) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBlock
(@NonNull BlockState block) void
addBlock
(@NonNull 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.toString()
static BlockBucket
withSingle
(@NonNull BlockState block)
-
Constructor Details
-
BlockBucket
-
BlockBucket
-
BlockBucket
-
BlockBucket
public BlockBucket()
-
-
Method Details
-
withSingle
-
deserialize
-
addBlock
-
addBlock
-
isEmpty
-
compile
-
isCompiled
-
toPattern
-
toString
-
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
-