Class LandExplosionManager
java.lang.Object
org.kingdoms.managers.land.protection.explosions.LandExplosionManager
- All Implemented Interfaces:
org.bukkit.event.Listener
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map<SimpleLocation, org.bukkit.entity.Hanging> Ignores block face.We don't want this to be a weak/entity map because the explosion source (e.g.protected static final EntityWeakHashSet<org.bukkit.entity.FallingBlock> protected static final doubleprotected static final doublestatic final booleanprotected static final doubleprotected static final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcustomExplosion(SiegeCannon cannon, List<org.bukkit.block.Block> blocks, org.bukkit.block.Block center, int radius, boolean hollow) protected static voidfancyExplode(org.bukkit.block.Block block) static voidprotected static org.bukkit.inventory.ItemStack[]getContainerContent(org.bukkit.block.BlockState state) voidhangingBreak(org.bukkit.event.hanging.HangingBreakEvent event) HangingBreakByEntityEvent doesn't fucking work for explosions.protected static booleanisAttachableOrHangingBlock(org.bukkit.block.BlockState state) This is not meant to be a general purpose method.voidonEntityAntiExplosion(org.bukkit.event.entity.EntityExplodeEvent event) Creepers, Fireballs, Windcharge (TRIGGER_BLOCK) and ...voidonEntityExplosionDamage(org.bukkit.event.entity.EntityDamageByEntityEvent event) voidonFancyExplosionFall(org.bukkit.event.block.BlockPhysicsEvent event) voidonFancyExplosionFall(org.bukkit.event.entity.EntityChangeBlockEvent event) voidonUnknownExplosion(org.bukkit.event.block.BlockExplodeEvent event) voidonWitherSkullExplosion(org.bukkit.event.entity.EntityChangeBlockEvent event) static voidprotectEntityFromExplosion(org.bukkit.event.Cancellable event, org.bukkit.entity.Entity damager, org.bukkit.entity.Entity entity)
-
Field Details
-
REGENERATE
public static final boolean REGENERATE -
HEIGHT_MIN
protected static final double HEIGHT_MIN -
HEIGHT_MAX
protected static final double HEIGHT_MAX -
SPREAD_MIN
protected static final double SPREAD_MIN -
SPREAD_MAX
protected static final double SPREAD_MAX -
EXPLOSION_BLOCKS
-
EXPLODED_ENTITIES
protected static final Map<org.bukkit.entity.Entity,List<org.bukkit.entity.Entity>> EXPLODED_ENTITIESWe don't want this to be a weak/entity map because the explosion source (e.g. TNT) is "removed" immediatelly after. -
BLOCKS_HOLDING_HANGING
Ignores block face. A single block can handle up to 4 hangings.
-
-
Constructor Details
-
LandExplosionManager
public LandExplosionManager()
-
-
Method Details
-
forceOngoingRegenerations
public static void forceOngoingRegenerations() -
customExplosion
protected static void customExplosion(SiegeCannon cannon, List<org.bukkit.block.Block> blocks, org.bukkit.block.Block center, int radius, boolean hollow) -
fancyExplode
protected static void fancyExplode(org.bukkit.block.Block block) -
getContainerContent
protected static org.bukkit.inventory.ItemStack[] getContainerContent(org.bukkit.block.BlockState state) -
isAttachableOrHangingBlock
protected static boolean isAttachableOrHangingBlock(org.bukkit.block.BlockState state) This is not meant to be a general purpose method. It should only be used for explosions. This list does not contain any material that requires a block underneath, that's handled by location ordering. It should only contain "wall" and "hanging" blocks. That means blocks with gravity are excluded as they're handled by default.Armorstand, item frames and paintings are not a part, because they're entities.
-
protectEntityFromExplosion
public static void protectEntityFromExplosion(org.bukkit.event.Cancellable event, org.bukkit.entity.Entity damager, org.bukkit.entity.Entity entity) -
hangingBreak
public void hangingBreak(org.bukkit.event.hanging.HangingBreakEvent event) HangingBreakByEntityEvent doesn't fucking work for explosions. It's only called when a player breaks it. -
onEntityExplosionDamage
public void onEntityExplosionDamage(org.bukkit.event.entity.EntityDamageByEntityEvent event) -
onUnknownExplosion
public void onUnknownExplosion(org.bukkit.event.block.BlockExplodeEvent event) -
onEntityAntiExplosion
public void onEntityAntiExplosion(org.bukkit.event.entity.EntityExplodeEvent event) Creepers, Fireballs, Windcharge (TRIGGER_BLOCK) and ... -
onWitherSkullExplosion
public void onWitherSkullExplosion(org.bukkit.event.entity.EntityChangeBlockEvent event) -
onFancyExplosionFall
public void onFancyExplosionFall(org.bukkit.event.entity.EntityChangeBlockEvent event) -
onFancyExplosionFall
public void onFancyExplosionFall(org.bukkit.event.block.BlockPhysicsEvent event)
-