Package ch.njol.skript.util
Class BlockUtils
java.lang.Object
ch.njol.skript.util.BlockUtils
TODO !Update with every version [blocks] - also update aliases-*.sk
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable StringblockToString(org.bukkit.block.Block block, int flags)Get the string version of a block, including type and location.static @Nullable org.bukkit.block.data.BlockDatacreateBlockData(String dataString)static Iterable<org.bukkit.block.Block>getBlocksAround(org.bukkit.block.Block b)static Iterable<org.bukkit.block.BlockFace>getFaces()static @Nullable org.bukkit.LocationgetLocation(@Nullable org.bukkit.block.Block b)static voidsendBlockChange(org.bukkit.entity.Player player, org.bukkit.Location location, org.bukkit.Material type, @Nullable BlockValues blockValues)static booleanstatic booleanset(org.bukkit.block.Block block, org.bukkit.Material type, @Nullable BlockValues blockValues, boolean applyPhysics)Sets the given block.
-
Constructor Details
-
BlockUtils
public BlockUtils()
-
-
Method Details
-
set
public static boolean set(org.bukkit.block.Block block, org.bukkit.Material type, @Nullable BlockValues blockValues, boolean applyPhysics)Sets the given block.- Parameters:
block- Block to set.type- New type of the block.blockValues- Block values to apply after setting the type.applyPhysics- Whether physics should be applied or not.- Returns:
- Whether setting block succeeded or not (currently always true).
-
set
-
sendBlockChange
public static void sendBlockChange(org.bukkit.entity.Player player, org.bukkit.Location location, org.bukkit.Material type, @Nullable BlockValues blockValues) -
getBlocksAround
-
getFaces
-
getLocation
public static @Nullable org.bukkit.Location getLocation(@Nullable org.bukkit.block.Block b)- Parameters:
b- A block- Returns:
- Location of the block, including its direction
-
createBlockData
-
blockToString
Get the string version of a block, including type and location. ex: 'stone' at 1.5, 1.5, 1.5 in world 'world'- Parameters:
block- Block to get string offlags-- Returns:
- String version of block
-