Class BlockEventListener
java.lang.Object
org.sgrewritten.stargate.listener.BlockEventListener
- All Implemented Interfaces:
org.bukkit.event.Listener
A listener for detecting any relevant block events
-
Constructor Summary
ConstructorDescriptionBlockEventListener
(@NotNull StargateAPI stargateAPI) Instantiates a new block event listener -
Method Summary
Modifier and TypeMethodDescriptionvoid
onBlockBreak
(org.bukkit.event.block.BlockBreakEvent event) Detects relevant block break eventsvoid
onBlockBurn
(org.bukkit.event.block.BlockBurnEvent event) Listens to and cancels any block burn events that may break a stargatevoid
onBlockDispense
(org.bukkit.event.block.BlockDispenseEvent event) void
onBlockExplode
(org.bukkit.event.block.BlockExplodeEvent event) Listens to and cancels any explosion events that may break a stargatevoid
onBlockFade
(org.bukkit.event.block.BlockFadeEvent event) void
onBlockFertilize
(org.bukkit.event.block.BlockFertilizeEvent event) void
onBlockFormEvent
(org.bukkit.event.block.BlockFormEvent event) Listens to and cancels any blocks from forming in a stargate's entrancevoid
onBlockFromTo
(org.bukkit.event.block.BlockFromToEvent event) Listens to and cancels any water or lava flowing from or into a stargate's entrancevoid
onBlockIgnite
(org.bukkit.event.block.BlockIgniteEvent event) Listens to and cancels any fire ignition events touching portal (avoids infinite fires)void
onBlockMultiPlace
(org.bukkit.event.block.BlockMultiPlaceEvent event) void
onBlockPhysics
(org.bukkit.event.block.BlockPhysicsEvent event) void
onBlockPlace
(org.bukkit.event.block.BlockPlaceEvent event) Checks for and blocks any block placement in a stargate's irisvoid
onEntityBlockForm
(org.bukkit.event.block.EntityBlockFormEvent event) void
onEntityBreakDoor
(org.bukkit.event.entity.EntityBreakDoorEvent event) void
onEntityChangeBlock
(org.bukkit.event.entity.EntityChangeBlockEvent event) void
onEntityExplode
(org.bukkit.event.entity.EntityExplodeEvent event) Listens to and cancels any explosion events that may break a stargatevoid
onEntityPlace
(org.bukkit.event.entity.EntityPlaceEvent event) void
onLeavesDecay
(org.bukkit.event.block.LeavesDecayEvent event) void
onPistonExtend
(org.bukkit.event.block.BlockPistonExtendEvent event) Listens to and cancels any piston extend events that may break a stargatevoid
onPistonRetract
(org.bukkit.event.block.BlockPistonRetractEvent event) Listens to and cancels any piston retract events that may break a stargatevoid
onPlayerBucketEmpty
(org.bukkit.event.player.PlayerBucketEmptyEvent event) void
onPortalCreate
(org.bukkit.event.world.PortalCreateEvent event) void
onSignChange
(org.bukkit.event.block.SignChangeEvent event) Checks for any sign change events that may result in the creation of a stargatevoid
onSpongeAbsorb
(org.bukkit.event.block.SpongeAbsorbEvent event) void
onTNTPrime
(org.bukkit.event.block.TNTPrimeEvent tntPrimeEvent)
-
Constructor Details
-
BlockEventListener
Instantiates a new block event listener- Parameters:
stargateAPI
-The stargate API
-
-
Method Details
-
onBlockBreak
public void onBlockBreak(org.bukkit.event.block.BlockBreakEvent event) Detects relevant block break eventsProtects a portal's control blocks and iris from destruction and destroys the attached portal if the entity is allowed.
- Parameters:
event
-The triggered block break event
-
onBlockPlace
public void onBlockPlace(org.bukkit.event.block.BlockPlaceEvent event) Checks for and blocks any block placement in a stargate's iris- Parameters:
event
-The triggered block place event
-
onSignChange
public void onSignChange(org.bukkit.event.block.SignChangeEvent event) Checks for any sign change events that may result in the creation of a stargate- Parameters:
event
-The triggered sign change event
-
onPistonExtend
public void onPistonExtend(org.bukkit.event.block.BlockPistonExtendEvent event) Listens to and cancels any piston extend events that may break a stargate- Parameters:
event
-The triggered piston extend event
-
onPistonRetract
public void onPistonRetract(org.bukkit.event.block.BlockPistonRetractEvent event) Listens to and cancels any piston retract events that may break a stargate- Parameters:
event
-The triggered piston retract event
-
onEntityExplode
public void onEntityExplode(org.bukkit.event.entity.EntityExplodeEvent event) Listens to and cancels any explosion events that may break a stargate- Parameters:
event
-The triggered explosion event
-
onBlockExplode
public void onBlockExplode(org.bukkit.event.block.BlockExplodeEvent event) Listens to and cancels any explosion events that may break a stargate- Parameters:
event
-The triggered explosion event
-
onBlockFromTo
public void onBlockFromTo(org.bukkit.event.block.BlockFromToEvent event) Listens to and cancels any water or lava flowing from or into a stargate's entrance- Parameters:
event
-The triggered block from to event
-
onBlockFormEvent
public void onBlockFormEvent(org.bukkit.event.block.BlockFormEvent event) Listens to and cancels any blocks from forming in a stargate's entrance- Parameters:
event
-The triggered block form event
-
onBlockPhysics
public void onBlockPhysics(org.bukkit.event.block.BlockPhysicsEvent event) -
onBlockBurn
public void onBlockBurn(org.bukkit.event.block.BlockBurnEvent event) Listens to and cancels any block burn events that may break a stargate- Parameters:
event
-The triggered burn event
-
onBlockIgnite
public void onBlockIgnite(org.bukkit.event.block.BlockIgniteEvent event) Listens to and cancels any fire ignition events touching portal (avoids infinite fires)- Parameters:
event
-The triggered ignition event
-
onBlockFade
public void onBlockFade(org.bukkit.event.block.BlockFadeEvent event) -
onBlockFertilize
public void onBlockFertilize(org.bukkit.event.block.BlockFertilizeEvent event) -
onBlockMultiPlace
public void onBlockMultiPlace(org.bukkit.event.block.BlockMultiPlaceEvent event) -
onEntityBlockForm
public void onEntityBlockForm(org.bukkit.event.block.EntityBlockFormEvent event) -
onLeavesDecay
public void onLeavesDecay(org.bukkit.event.block.LeavesDecayEvent event) -
onSpongeAbsorb
public void onSpongeAbsorb(org.bukkit.event.block.SpongeAbsorbEvent event) -
onEntityChangeBlock
public void onEntityChangeBlock(org.bukkit.event.entity.EntityChangeBlockEvent event) -
onEntityBreakDoor
public void onEntityBreakDoor(org.bukkit.event.entity.EntityBreakDoorEvent event) -
onPortalCreate
public void onPortalCreate(org.bukkit.event.world.PortalCreateEvent event) -
onEntityPlace
public void onEntityPlace(org.bukkit.event.entity.EntityPlaceEvent event) -
onPlayerBucketEmpty
public void onPlayerBucketEmpty(org.bukkit.event.player.PlayerBucketEmptyEvent event) -
onBlockDispense
public void onBlockDispense(org.bukkit.event.block.BlockDispenseEvent event) -
onTNTPrime
public void onTNTPrime(org.bukkit.event.block.TNTPrimeEvent tntPrimeEvent)
-