Class BrushPattern

java.lang.Object
com.thevoxelbox.voxelsniper.brush.property.BrushPattern

public class BrushPattern extends Object
A BrushPattern based on a WE pattern and a name.
  • Constructor Details

    • BrushPattern

      public BrushPattern(Pattern pattern, String name)
      Create a new brush pattern.
      Parameters:
      pattern - the pattern
      name - the name
      Since:
      2.6.0
    • BrushPattern

      public BrushPattern(BlockType blockType)
      Create a new brush pattern from a block type.
      Parameters:
      blockType - the block type
      Since:
      2.6.0
    • BrushPattern

      public BrushPattern(BlockState blockState)
      Create a new brush pattern from a block state.
      Parameters:
      blockState - the block state
      Since:
      2.6.0
  • Method Details

    • getPattern

      public Pattern getPattern()
      Gets pattern.
      Returns:
      the pattern
      Since:
      2.6.0
    • getName

      public String getName()
      Return the name: - command argument for complex patterns - block id for block types - block data for block states
      Returns:
      the pattern name
      Since:
      2.6.0
    • asBlockType

      @Nullable public @Nullable BlockType asBlockType()
      Try to parse the pattern as a block type.
      Returns:
      the potential corresponding block type
      Since:
      2.6.0
    • asBlockState

      @Nullable public @Nullable BlockState asBlockState()
      Try to parse the pattern as a block state.
      Returns:
      the potential corresponding block state
      Since:
      2.6.0