Class BukkitBlockState

java.lang.Object
wtf.choco.veinminer.platform.world.BukkitBlockState
All Implemented Interfaces:
BlockState

public final class BukkitBlockState extends Object implements BlockState
A Bukkit implementation of BlockState.
  • Method Details

    • getType

      @NotNull public @NotNull BlockType getType()
      Description copied from interface: BlockState
      Get the BlockType represented by this BlockState.
      Specified by:
      getType in interface BlockState
      Returns:
      the block type
    • getAsString

      @NotNull public @NotNull String getAsString(boolean hideUnspecified)
      Description copied from interface: BlockState
      Get this BlockState as a string.
      Specified by:
      getAsString in interface BlockState
      Parameters:
      hideUnspecified - whether or not to hide states that were not explicitly set in the construction of this state
      Returns:
      the string
    • matches

      public boolean matches(@NotNull @NotNull BlockState state)
      Description copied from interface: BlockState
      Check whether or not this BlockState matches the given BlockState.

      A BlockState will match if all states that were explicitly set by this BlockState match that of the provided BlockState. Any states that were not explicitly set are ignored. Therefore, while a.matches(b) may return true, it cannot be guaranteed that b.matches(a) will also return true.

      Specified by:
      matches in interface BlockState
      Parameters:
      state - the state to check
      Returns:
      true if the provided BlockState matches this BlockState, false if one of its states do not match one of this BlockState's explicitly set states
    • of

      @NotNull public static @NotNull BlockState of(@NotNull @NotNull BlockData blockData)
      Get a BlockState for the given BlockData.
      Parameters:
      blockData - the block data
      Returns:
      the BlockState
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object