Class BlockTypeWrapper

java.lang.Object
com.plotsquared.core.plot.flag.types.BlockTypeWrapper

public class BlockTypeWrapper extends Object
Container that class either contains a BlockType or a BlockCategory
  • Method Details

    • get

      public static BlockTypeWrapper get(com.sk89q.worldedit.world.block.BlockType blockType)
    • get

      public static BlockTypeWrapper get(com.sk89q.worldedit.world.block.BlockCategory blockCategory)
    • get

      public static BlockTypeWrapper get(String blockCategoryId)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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. If BlockCategory.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.
      If BlockCategory.REGISTRY isn't populated yet, null is returned.
      Returns:
      the block category represented by this wrapper.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getBlockType

      public @Nullable com.sk89q.worldedit.world.block.BlockType getBlockType()