Search in sources :

Example 51 with EntityDamageEvent

use of org.bukkit.event.entity.EntityDamageEvent in project Denizen-For-Bukkit by DenizenScript.

the class EntityDeathScriptEvent method onEntityDeath.

@EventHandler
public void onEntityDeath(EntityDeathEvent event) {
    LivingEntity livingEntity = event.getEntity();
    dEntity.rememberEntity(livingEntity);
    entity = new dEntity(livingEntity);
    dPlayer player = null;
    if (entity.isPlayer()) {
        player = entity.getDenizenPlayer();
    }
    damager = null;
    EntityDamageEvent lastDamage = entity.getBukkitEntity().getLastDamageCause();
    if (lastDamage != null) {
        if (lastDamage instanceof EntityDamageByEntityEvent) {
            damager = new dEntity(((EntityDamageByEntityEvent) lastDamage).getDamager()).getDenizenObject();
        }
    }
    message = null;
    inventory = null;
    PlayerDeathEvent subEvent = null;
    if (event instanceof PlayerDeathEvent) {
        subEvent = (PlayerDeathEvent) event;
        message = new Element(subEvent.getDeathMessage());
        // Null check to prevent NPCs from causing an NPE
        if (player != null) {
            inventory = player.getInventory();
        }
        keep_inv = subEvent.getKeepInventory();
        keep_level = subEvent.getKeepLevel();
    }
    cause = null;
    if (event.getEntity().getLastDamageCause() != null) {
        cause = new Element(event.getEntity().getLastDamageCause().getCause().toString());
    }
    drops = new dList();
    for (ItemStack stack : event.getDrops()) {
        if (stack == null) {
            drops.add("i@air");
        } else {
            drops.add(new dItem(stack).identify());
        }
    }
    changed_drops = false;
    xp = event.getDroppedExp();
    this.event = event;
    fire();
    event.setDroppedExp(xp);
    if (changed_drops) {
        event.getDrops().clear();
        for (String drop : drops) {
            dItem item = dItem.valueOf(drop);
            if (item != null) {
                event.getDrops().add(item.getItemStack());
            }
        }
    }
    if (event instanceof PlayerDeathEvent) {
        ((PlayerDeathEvent) event).setKeepInventory(keep_inv);
        ((PlayerDeathEvent) event).setKeepLevel(keep_level);
    }
    if (message != null && subEvent != null) {
        subEvent.setDeathMessage(message.asString());
    }
    if (cancelled && subEvent != null) {
        subEvent.setDeathMessage(null);
    }
    dEntity.forgetEntity(livingEntity);
}
Also used : LivingEntity(org.bukkit.entity.LivingEntity) net.aufdemrand.denizen.objects.dItem(net.aufdemrand.denizen.objects.dItem) EntityDamageByEntityEvent(org.bukkit.event.entity.EntityDamageByEntityEvent) net.aufdemrand.denizen.objects.dEntity(net.aufdemrand.denizen.objects.dEntity) net.aufdemrand.denizen.objects.dPlayer(net.aufdemrand.denizen.objects.dPlayer) Element(net.aufdemrand.denizencore.objects.Element) net.aufdemrand.denizencore.objects.dList(net.aufdemrand.denizencore.objects.dList) PlayerDeathEvent(org.bukkit.event.entity.PlayerDeathEvent) ItemStack(org.bukkit.inventory.ItemStack) EntityDamageEvent(org.bukkit.event.entity.EntityDamageEvent) EventHandler(org.bukkit.event.EventHandler)

Example 52 with EntityDamageEvent

use of org.bukkit.event.entity.EntityDamageEvent in project Prism-Bukkit by prism.

the class EntitySerializer method serialize.

/**
 * Serialize entity.
 * @param entity Entity.
 */
public final void serialize(Entity entity) {
    entityName = entity.getType().name().toLowerCase();
    // Get custom name
    customName = entity.getCustomName();
    // Get animal age
    if (entity instanceof Ageable) {
        isAdult = ((Ageable) entity).isAdult();
    }
    // Owner
    if (entity instanceof Tameable) {
        final Tameable mob = (Tameable) entity;
        if (mob.getOwner() != null) {
            tamingOwner = mob.getOwner().getUniqueId().toString();
        } else if (mob.isTamed()) {
            tamingOwner = "-none-";
        }
    }
    // Sitting
    if (entity instanceof Sittable) {
        sitting = ((Sittable) entity).isSitting();
    }
    EntityDamageEvent damageEvent = entity.getLastDamageCause();
    // Saves us the null check
    if (damageEvent instanceof EntityDamageByEntityEvent && !damageEvent.isCancelled() && damageEvent.getDamage() > ((LivingEntity) entity).getHealth()) {
        EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) damageEvent;
        if (e.getDamager() instanceof Projectile) {
            customDesc = EntityUtils.getCustomProjectileDescription((Projectile) e.getDamager());
        }
    }
    serializer(entity);
}
Also used : LivingEntity(org.bukkit.entity.LivingEntity) Sittable(org.bukkit.entity.Sittable) Tameable(org.bukkit.entity.Tameable) EntityDamageByEntityEvent(org.bukkit.event.entity.EntityDamageByEntityEvent) Ageable(org.bukkit.entity.Ageable) EntityDamageEvent(org.bukkit.event.entity.EntityDamageEvent) Projectile(org.bukkit.entity.Projectile)

Example 53 with EntityDamageEvent

use of org.bukkit.event.entity.EntityDamageEvent in project Prism-Bukkit by prism.

the class PrismEntityEvents method onEntityDeath.

/**
 * EntityDeathEvent.
 * @param event EntityDeathEvent
 */
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntityDeath(final EntityDeathEvent event) {
    final LivingEntity entity = event.getEntity();
    // Mob Death
    if (!(entity instanceof Player)) {
        // Log item drops
        if (Prism.getIgnore().event("item-drop", entity.getWorld())) {
            String name = entity.getType().name().toLowerCase();
            // Inventory
            if (entity instanceof InventoryHolder) {
                final InventoryHolder holder = (InventoryHolder) entity;
                for (final ItemStack i : holder.getInventory().getContents()) {
                    if (checkNotNullorAir(i)) {
                        RecordingQueue.addToQueue(ActionFactory.createItemStack("item-drop", i, i.getAmount(), -1, null, entity.getLocation(), name));
                    }
                }
            }
            // Equipment
            EntityEquipment equipment = entity.getEquipment();
            if (equipment != null) {
                for (final ItemStack i : equipment.getArmorContents()) {
                    if (checkNotNullorAir(i)) {
                        RecordingQueue.addToQueue(ActionFactory.createItemStack("item-drop", i, i.getAmount(), -1, null, entity.getLocation(), name));
                    }
                }
            }
            // Hand items not stored in "getArmorContents"
            ItemStack main = entity.getEquipment().getItemInMainHand();
            ItemStack off = entity.getEquipment().getItemInOffHand();
            if (checkNotNullorAir(main)) {
                RecordingQueue.addToQueue(ActionFactory.createItemStack("item-drop", main, main.getAmount(), -1, null, entity.getLocation(), name));
            }
            if (checkNotNullorAir(off)) {
                RecordingQueue.addToQueue(ActionFactory.createItemStack("item-drop", off, off.getAmount(), -1, null, entity.getLocation(), name));
            }
        }
        EntityDamageEvent damageEvent = entity.getLastDamageCause();
        Entity entitySource = null;
        Block blockSource = null;
        // Resolve source
        if (damageEvent != null && !damageEvent.isCancelled()) {
            if (damageEvent instanceof EntityDamageByEntityEvent) {
                entitySource = ((EntityDamageByEntityEvent) damageEvent).getDamager();
                if (entitySource instanceof Projectile) {
                    ProjectileSource ps = ((Projectile) entitySource).getShooter();
                    if (ps instanceof BlockProjectileSource) {
                        entitySource = null;
                        blockSource = ((BlockProjectileSource) ps).getBlock();
                    } else {
                        entitySource = (Entity) ps;
                    }
                }
            } else if (damageEvent instanceof EntityDamageByBlockEvent) {
                blockSource = ((EntityDamageByBlockEvent) damageEvent).getDamager();
            }
        }
        // Create handlers
        if (entitySource instanceof Player) {
            Player player = (Player) entitySource;
            if (!Prism.getIgnore().event("player-kill", player)) {
                return;
            }
            RecordingQueue.addToQueue(ActionFactory.createEntity("player-kill", entity, player));
        } else if (entitySource != null) {
            if (!Prism.getIgnore().event("entity-kill", entity.getWorld())) {
                return;
            }
            String name = entitySource.getType().name().toLowerCase(Locale.ENGLISH).replace('_', ' ');
            RecordingQueue.addToQueue(ActionFactory.createEntity("entity-kill", entity, name));
        } else if (blockSource != null) {
            if (!Prism.getIgnore().event("entity-kill", entity.getWorld())) {
                return;
            }
            String name = "block:" + blockSource.getType().name().toLowerCase(Locale.ENGLISH).replace('_', ' ');
            RecordingQueue.addToQueue(ActionFactory.createEntity("entity-kill", entity, name));
        } else {
            if (!Prism.getIgnore().event("entity-kill", entity.getWorld())) {
                return;
            }
            String name = "unknown";
            if (damageEvent != null && !damageEvent.isCancelled()) {
                name = damageEvent.getCause().name().toLowerCase(Locale.ENGLISH).replace('_', ' ');
            }
            RecordingQueue.addToQueue(ActionFactory.createEntity("entity-kill", entity, name));
        }
    /*
             * if (entity.getLastDamageCause() instanceof EntityDamageByEntityEvent) { final
             * EntityDamageByEntityEvent entityDamageByEntityEvent =
             * (EntityDamageByEntityEvent) entity .getLastDamageCause();
             *
             * // Mob killed by player if (entityDamageByEntityEvent.getDamager() instanceof
             * Player) { final Player player = (Player)
             * entityDamageByEntityEvent.getDamager(); if
             * (!Prism.getIgnore().event("player-kill", player)) return;
             * RecordingQueue.addToQueue(ActionFactory.createEntity("player-kill", entity,
             * player));
             *
             * } // Mob shot by an arrow from a player else if
             * (entityDamageByEntityEvent.getDamager() instanceof Arrow) { final Arrow arrow
             * = (Arrow) entityDamageByEntityEvent.getDamager();
             *
             * if (arrow.getShooter() instanceof Player) { final Player player = (Player)
             * arrow.getShooter(); if (!Prism.getIgnore().event("player-kill", player))
             * return; RecordingQueue.addToQueue(ActionFactory.createEntity("player-kill",
             * entity, player));
             *
             * } else if (arrow.getShooter() instanceof LivingEntity) { final Entity damager
             * = (Entity) arrow.getShooter(); String name = "unknown"; if (damager != null)
             * { name = damager.getType().name().toLowerCase(); }
             *
             * if (!Prism.getIgnore().event("entity-kill", entity.getWorld())) return;
             * RecordingQueue.addToQueue(ActionFactory.createEntity("entity-kill", entity,
             * name)); } else if (arrow.getShooter() instanceof BlockProjectileSource) {
             *
             * final Block damager = (Block)
             * ((BlockProjectileSource)arrow.getShooter()).getBlock();
             *
             * if (!Prism.getIgnore().event("entity-kill", entity.getWorld())) return;
             *
             * String name = "block:" + damager.getType().name().toLowerCase();
             *
             * RecordingQueue.addToQueue(ActionFactory.createEntity("entity-kill", entity,
             * name)); } } else { // Mob died by another mob final Entity damager =
             * entityDamageByEntityEvent.getDamager(); String name = "unknown"; if (damager
             * != null) { name = damager.getType().name().toLowerCase(); }
             *
             * if (!Prism.getIgnore().event("entity-kill", entity.getWorld())) return;
             * RecordingQueue.addToQueue(ActionFactory.createEntity("entity-kill", entity,
             * name)); } } else {
             *
             * if (!Prism.getIgnore().event("entity-kill", entity.getWorld())) return;
             *
             * String killer = "unknown"; final EntityDamageEvent damage =
             * entity.getLastDamageCause(); if (damage != null) { final DamageCause cause =
             * damage.getCause(); if (cause != null) { killer = cause.name().toLowerCase();
             * } }
             *
             * // Record the death as natural
             * RecordingQueue.addToQueue(ActionFactory.createEntity("entity-kill", entity,
             * killer));
             *
             * }
             */
    } else {
        // Determine who died and what the exact cause was
        final Player p = (Player) event.getEntity();
        if (Prism.getIgnore().event("player-death", p)) {
            final String cause = DeathUtils.getCauseNiceName(p);
            String attacker = DeathUtils.getAttackerName(p);
            if (attacker.equals("pvpwolf")) {
                final String owner = DeathUtils.getTameWolfOwner(event);
                attacker = owner + "'s wolf";
            }
            RecordingQueue.addToQueue(ActionFactory.createPlayerDeath("player-death", p, cause, attacker));
        }
        // Log item drops
        if (Prism.getIgnore().event("item-drop", p)) {
            if (!event.getDrops().isEmpty()) {
                for (final ItemStack i : event.getDrops()) {
                    RecordingQueue.addToQueue(ActionFactory.createItemStack("item-drop", i, i.getAmount(), -1, null, p.getLocation(), p));
                }
            }
        }
    }
}
Also used : Entity(org.bukkit.entity.Entity) LivingEntity(org.bukkit.entity.LivingEntity) Player(org.bukkit.entity.Player) EntityDamageByBlockEvent(org.bukkit.event.entity.EntityDamageByBlockEvent) BlockProjectileSource(org.bukkit.projectiles.BlockProjectileSource) Projectile(org.bukkit.entity.Projectile) LivingEntity(org.bukkit.entity.LivingEntity) EntityDamageByEntityEvent(org.bukkit.event.entity.EntityDamageByEntityEvent) EntityEquipment(org.bukkit.inventory.EntityEquipment) Block(org.bukkit.block.Block) ProjectileSource(org.bukkit.projectiles.ProjectileSource) BlockProjectileSource(org.bukkit.projectiles.BlockProjectileSource) ItemStack(org.bukkit.inventory.ItemStack) InventoryHolder(org.bukkit.inventory.InventoryHolder) EntityDamageEvent(org.bukkit.event.entity.EntityDamageEvent) EventHandler(org.bukkit.event.EventHandler)

Example 54 with EntityDamageEvent

use of org.bukkit.event.entity.EntityDamageEvent in project MagicPlugin by elBukkit.

the class Mage method onDamage.

public void onDamage(EntityDamageEvent event) {
    String damageType = currentDamageType;
    currentDamageType = null;
    lastDamage = event.getDamage();
    LivingEntity entity = getLivingEntity();
    if (entity == null) {
        return;
    }
    // Send on to any registered spells
    List<Listener> damageSpells = new ArrayList<>(damageListeners);
    for (Listener listener : damageSpells) {
        callEvent(listener, event);
        if (event.isCancelled())
            break;
    }
    EntityDamageEvent.DamageCause cause = event.getCause();
    if (cause == EntityDamageEvent.DamageCause.FALL) {
        if (fallProtectionCount > 0 && fallProtection > 0 && fallProtection > System.currentTimeMillis()) {
            event.setCancelled(true);
            fallProtectionCount--;
            if (fallingSpell != null) {
                double scale = 1;
                LivingEntity li = getLivingEntity();
                if (li != null) {
                    scale = event.getDamage() / CompatibilityLib.getCompatibilityUtils().getMaxHealth(li);
                }
                fallingSpell.playEffects("land", (float) scale, getLocation().getBlock().getRelative(BlockFace.DOWN));
            }
            if (fallProtectionCount <= 0) {
                fallProtection = 0;
                fallingSpell = null;
            }
            return;
        } else {
            fallingSpell = null;
        }
    }
    if (isSuperProtected()) {
        event.setCancelled(true);
        if (entity.getFireTicks() > 0) {
            entity.setFireTicks(0);
        }
        return;
    }
    if (event.isCancelled()) {
        return;
    }
    // First check for damage reduction
    double reduction = 0;
    Double overallProtection = protection.get("overall");
    if (overallProtection != null) {
        reduction = overallProtection * controller.getMaxDamageReduction("overall");
    }
    // Apply weaknesses
    double multiplier = 1;
    Double overallWeakness = weakness.get("overall");
    if (overallWeakness != null && overallWeakness > 0) {
        double defendMultiplier = controller.getMaxDefendMultiplier("overall");
        if (defendMultiplier > 1) {
            defendMultiplier = 1 + (defendMultiplier - 1) * overallWeakness;
            multiplier *= defendMultiplier;
        }
    }
    if (cause == EntityDamageEvent.DamageCause.FIRE_TICK) {
        // Also put out fire if they have maxed out fire protection.
        double damageReductionFire = getProtection("fire");
        if (damageReductionFire >= 1 && entity.getFireTicks() > 0) {
            entity.setFireTicks(0);
        }
    }
    lastDamageType = getDamageType(damageType, cause);
    damageType = lastDamageType;
    // Process triggers
    trigger("damage");
    double protection = getProtection(damageType);
    double maxReduction = controller.getMaxDamageReduction(damageType);
    reduction += protection * maxReduction;
    if (reduction >= 1) {
        event.setCancelled(true);
        sendDebugMessage(ChatColor.RED + "Damage nullified by " + ChatColor.BLUE + damageType + " (" + cause + ")", 8);
        return;
    }
    double damage = event.getDamage();
    sendDebugMessage(ChatColor.RED + "Damaged by " + ChatColor.BLUE + (damageType == null ? "generic" : damageType) + " (" + cause + ")" + ChatColor.RED + " for " + ChatColor.DARK_RED + damage, 10);
    if (reduction > 0) {
        damage = (1.0 - reduction) * damage;
        sendDebugMessage(ChatColor.DARK_RED + "Damage type " + ChatColor.BLUE + damageType + " reduced by " + ChatColor.AQUA + reduction + ChatColor.DARK_RED + " to " + ChatColor.RED + damage, 9);
        event.setDamage(damage);
    }
    double weakness = getWeakness(damageType);
    double maxMultiplier = controller.getMaxDefendMultiplier(damageType);
    if (maxMultiplier > 1 && weakness > 0) {
        weakness = 1 + (maxMultiplier - 1) * weakness;
        multiplier *= weakness;
    }
    if (multiplier > 1) {
        damage = multiplier * damage;
        sendDebugMessage(ChatColor.DARK_RED + "Damage type " + ChatColor.BLUE + damageType + " multiplied by " + ChatColor.AQUA + multiplier + ChatColor.DARK_RED + " to " + ChatColor.RED + damage, 9);
        event.setDamage(damage);
    }
    if (damage > 0) {
        for (Iterator<Batch> iterator = pendingBatches.iterator(); iterator.hasNext(); ) {
            Batch batch = iterator.next();
            if (!(batch instanceof SpellBatch))
                continue;
            SpellBatch spellBatch = (SpellBatch) batch;
            Spell spell = spellBatch.getSpell();
            double cancelOnDamage = spell.cancelOnDamage();
            if (cancelOnDamage > 0 && cancelOnDamage < damage) {
                batch.cancel();
                iterator.remove();
            }
        }
        for (MageSpell spell : activeSpells) {
            double cancelOnDamage = spell.cancelOnDamage();
            if (cancelOnDamage > 0 && cancelOnDamage < damage) {
                spell.cancel();
            }
        }
    }
}
Also used : SpellBatch(com.elmakers.mine.bukkit.api.batch.SpellBatch) Listener(org.bukkit.event.Listener) ArrayList(java.util.ArrayList) MageSpell(com.elmakers.mine.bukkit.api.spell.MageSpell) ActionSpell(com.elmakers.mine.bukkit.spell.ActionSpell) TriggeredSpell(com.elmakers.mine.bukkit.spell.TriggeredSpell) Spell(com.elmakers.mine.bukkit.api.spell.Spell) BaseSpell(com.elmakers.mine.bukkit.spell.BaseSpell) LivingEntity(org.bukkit.entity.LivingEntity) Batch(com.elmakers.mine.bukkit.api.batch.Batch) UndoBatch(com.elmakers.mine.bukkit.batch.UndoBatch) SpellBatch(com.elmakers.mine.bukkit.api.batch.SpellBatch) MageSpell(com.elmakers.mine.bukkit.api.spell.MageSpell) EntityDamageEvent(org.bukkit.event.entity.EntityDamageEvent)

Example 55 with EntityDamageEvent

use of org.bukkit.event.entity.EntityDamageEvent in project MagicPlugin by elBukkit.

the class EntityController method onEntityDeath.

/**
 * This death handler is for mobs and players alike
 */
@EventHandler(priority = EventPriority.LOWEST)
public void onEntityDeath(EntityDeathEvent event) {
    Entity entity = event.getEntity();
    boolean isPlayer = entity instanceof Player;
    if (isPlayer) {
        EntityDamageEvent.DamageCause cause = entity.getLastDamageCause() == null ? null : entity.getLastDamageCause().getCause();
        controller.info("* Processing death of " + entity.getName() + " from " + cause + " with drops: " + event.getDrops().size(), 15);
    }
    Long spawnerId = CompatibilityLib.getEntityMetadataUtils().getLong(entity, MagicMetaKeys.AUTOMATION);
    if (spawnerId != null) {
        MagicBlock magicBlock = controller.getActiveAutomaton(spawnerId);
        if (magicBlock != null) {
            magicBlock.onSpawnDeath();
        }
    }
    // Just don't ever clear player death drops, for real
    if (!isPlayer) {
        if (CompatibilityLib.getEntityMetadataUtils().getBoolean(entity, MagicMetaKeys.NO_DROPS)) {
            event.setDroppedExp(0);
            event.getDrops().clear();
        } else {
            UndoList pendingUndo = controller.getEntityUndo(entity);
            if (pendingUndo != null && pendingUndo.isUndoType(entity.getType())) {
                event.getDrops().clear();
            }
        }
    } else {
        // Clean up metadata that shouldn't be on players
        CompatibilityLib.getEntityMetadataUtils().remove(entity, MagicMetaKeys.NO_DROPS);
    }
    EntityDamageEvent damageEvent = event.getEntity().getLastDamageCause();
    if (damageEvent instanceof EntityDamageByEntityEvent) {
        EntityDamageByEntityEvent dbe = (EntityDamageByEntityEvent) damageEvent;
        Entity damager = dbe.getDamager();
        damager = controller.getDamageSource(damager);
        if (damager != null) {
            Mage damagerMage = controller.getRegisteredMage(damager);
            if (damagerMage != null) {
                damagerMage.trigger("kill");
            }
        }
    }
    com.elmakers.mine.bukkit.magic.Mage mage = controller.getRegisteredMage(entity);
    if (mage == null)
        return;
    mage.deactivateAllSpells();
    mage.onDeath(event);
    if (isPlayer) {
        controller.info("* Mage class handled death, drops now: " + event.getDrops().size(), 15);
    }
    if (event instanceof PlayerDeathEvent) {
        PlayerDeathEvent playerDeath = (PlayerDeathEvent) event;
        handlePlayerDeath(playerDeath.getEntity(), mage, playerDeath.getDrops(), playerDeath.getKeepInventory());
    }
}
Also used : Entity(org.bukkit.entity.Entity) Player(org.bukkit.entity.Player) EffectPlayer(com.elmakers.mine.bukkit.api.effect.EffectPlayer) PlayerDeathEvent(org.bukkit.event.entity.PlayerDeathEvent) MagicBlock(com.elmakers.mine.bukkit.block.magic.MagicBlock) UndoList(com.elmakers.mine.bukkit.api.block.UndoList) EntityDamageByEntityEvent(org.bukkit.event.entity.EntityDamageByEntityEvent) Mage(com.elmakers.mine.bukkit.api.magic.Mage) EntityDamageEvent(org.bukkit.event.entity.EntityDamageEvent) EventHandler(org.bukkit.event.EventHandler)

Aggregations

EntityDamageEvent (org.bukkit.event.entity.EntityDamageEvent)109 Player (org.bukkit.entity.Player)43 EntityDamageByEntityEvent (org.bukkit.event.entity.EntityDamageByEntityEvent)40 Entity (org.bukkit.entity.Entity)30 LivingEntity (org.bukkit.entity.LivingEntity)25 EventHandler (org.bukkit.event.EventHandler)24 Projectile (org.bukkit.entity.Projectile)15 ItemStack (org.bukkit.inventory.ItemStack)13 Test (org.junit.Test)11 Function (com.google.common.base.Function)8 ProjectileSource (org.bukkit.projectiles.ProjectileSource)8 Location (org.bukkit.Location)7 EntityDamageByBlockEvent (org.bukkit.event.entity.EntityDamageByBlockEvent)7 DamageCause (org.bukkit.event.entity.EntityDamageEvent.DamageCause)7 EntityDeathEvent (org.bukkit.event.entity.EntityDeathEvent)7 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)7 ArrayList (java.util.ArrayList)6 List (java.util.List)6 World (org.bukkit.World)6 Block (org.bukkit.block.Block)6