Interface BlockAccessor
- All Known Implementing Classes:
BukkitBlockAccessor
public interface BlockAccessor
A generic interface to get types and states from coordinates.
-
Method Summary
Modifier and TypeMethodDescription@NotNull BlockState
getState
(int x, int y, int z) Get theBlockState
at the given coordinates.default @NotNull BlockState
getState
(@NotNull BlockPosition position) Get theBlockState
at the givenBlockPosition
.@NotNull BlockType
getType
(int x, int y, int z) Get theBlockType
at the given coordinates.default @NotNull BlockType
getType
(@NotNull BlockPosition position) Get theBlockType
at the givenBlockPosition
.@NotNull String
Get the name of the world being accessed by thisBlockAccessor
.
-
Method Details
-
getWorldName
Get the name of the world being accessed by thisBlockAccessor
.- Returns:
- the world name
-
getType
Get theBlockType
at the given coordinates.- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinate- Returns:
- the type
-
getType
Get theBlockType
at the givenBlockPosition
.- Parameters:
position
- the position- Returns:
- the type
-
getState
Get theBlockState
at the given coordinates.- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinate- Returns:
- the state
-
getState
Get theBlockState
at the givenBlockPosition
.- Parameters:
position
- the position- Returns:
- the state
-