Package org.sgrewritten.stargate.util
Class BlockEventHelper
java.lang.Object
org.sgrewritten.stargate.util.BlockEventHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic List
<org.bukkit.block.Block> getBlockList
(List<org.bukkit.block.BlockState> blockStates) Convert a list of block states into a list of blocksstatic boolean
onAnyBlockChangeEvent
(org.bukkit.event.Cancellable event, BlockEventType type, org.bukkit.Location location, StargateAPI stargateAPI) Does event handling for any event that changes one blockstatic void
onAnyMultiBlockChangeEvent
(org.bukkit.event.Cancellable event, BlockEventType type, List<org.bukkit.block.Block> blocks, StargateAPI stargateAPI) Does event handling for any event that changes multiple block
-
Method Details
-
onAnyBlockChangeEvent
public static boolean onAnyBlockChangeEvent(org.bukkit.event.Cancellable event, BlockEventType type, org.bukkit.Location location, StargateAPI stargateAPI) Does event handling for any event that changes one block- Parameters:
event
-The event to possibly cancel
type
-The type of event
location
-The location of the block
stargateAPI
-The stargate api
-
getBlockList
public static List<org.bukkit.block.Block> getBlockList(List<org.bukkit.block.BlockState> blockStates) Convert a list of block states into a list of blocks- Parameters:
blockStates
-A list of blockStates
- Returns:
A list of blocks
-
onAnyMultiBlockChangeEvent
public static void onAnyMultiBlockChangeEvent(org.bukkit.event.Cancellable event, BlockEventType type, List<org.bukkit.block.Block> blocks, StargateAPI stargateAPI) Does event handling for any event that changes multiple block- Parameters:
event
-The event to possibly cancel
type
-The type of event
blocks
-The blocks affected
-