Class BlockUtil
java.lang.Object
com.github.imdabigboss.easydatapack.api.utils.BlockUtil
Some utilities for blocks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic @NonNull List<org.bukkit.Material>A list of the blocks that shouldn't be broken by the player in survival mode. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanbreakBlock(@NonNull org.bukkit.Server server, @NonNull org.bukkit.entity.Player player, @NonNull org.bukkit.block.Block block, @NonNull org.bukkit.inventory.ItemStack item)Breaks a block as if a player broke it: correct drops & event firing.
-
Field Details
-
UNBREAKABLE_BLOCKS
A list of the blocks that shouldn't be broken by the player in survival mode.
-
-
Constructor Details
-
BlockUtil
public BlockUtil()
-
-
Method Details
-
breakBlock
public static boolean breakBlock(@NonNull org.bukkit.Server server, @NonNull org.bukkit.entity.Player player, @NonNull org.bukkit.block.Block block, @NonNull org.bukkit.inventory.ItemStack item)Breaks a block as if a player broke it: correct drops & event firing.- Parameters:
server- the serverplayer- the playerblock- the block to breakitem- the item used to break the block- Returns:
- true if the block was broken, false otherwise
-