Class BlockTypeWrapper
java.lang.Object
com.plotsquared.core.plot.flag.types.BlockTypeWrapper
Container that class either contains a
BlockType
or a BlockCategory
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts(com.sk89q.worldedit.world.block.BlockType blockType)
boolean
static BlockTypeWrapper
get(com.sk89q.worldedit.world.block.BlockCategory blockCategory)
static BlockTypeWrapper
get(com.sk89q.worldedit.world.block.BlockType blockType)
static BlockTypeWrapper
@Nullable com.sk89q.worldedit.world.block.BlockCategory
Returns the block category associated with this wrapper.@Nullable com.sk89q.worldedit.world.block.BlockType
int
hashCode()
toString()
-
Method Details
-
get
-
get
-
get
-
toString
-
accepts
public boolean accepts(com.sk89q.worldedit.world.block.BlockType blockType) -
getBlockCategory
public @Nullable com.sk89q.worldedit.world.block.BlockCategory getBlockCategory()Returns the block category associated with this wrapper.
Invocation will try to lazily initialize the block category if it's not set yet but the category id is present. IfBlockCategory.REGISTRY
is already populated but does not contain a category with the given name, a BlockCategory containing no items is returned. If this wrapper does not wrap a BlockCategory, null is returned.
IfBlockCategory.REGISTRY
isn't populated yet, null is returned.- Returns:
- the block category represented by this wrapper.
-
equals
-
hashCode
public int hashCode() -
getBlockType
public @Nullable com.sk89q.worldedit.world.block.BlockType getBlockType()
-