Class LandExplosionManager

java.lang.Object
org.kingdoms.managers.land.protection.explosions.LandExplosionManager
All Implemented Interfaces:
org.bukkit.event.Listener

public final class LandExplosionManager extends Object implements org.bukkit.event.Listener
  • 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

      protected static final EntityWeakHashSet<org.bukkit.entity.FallingBlock> EXPLOSION_BLOCKS
    • EXPLODED_ENTITIES

      protected static final Map<org.bukkit.entity.Entity,List<org.bukkit.entity.Entity>> EXPLODED_ENTITIES
      We don't want this to be a weak/entity map because the explosion source (e.g. TNT) is "removed" immediatelly after.
    • BLOCKS_HOLDING_HANGING

      protected static final Map<SimpleLocation,org.bukkit.entity.Hanging> 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)