ArenaPlayerStatistics stats = ap.getStats();
if (stats != null) {
ap.getStats().inc("kills");
arena.getScoreboard().addKill(p);
}
MABoss boss = monsters.getBoss(damagee);
if (boss != null) {
ItemStack reward = boss.getReward();
if (reward != null) {
String msg = p.getName() + " killed the boss and won: ";
if (reward.getTypeId() == MobArena.ECONOMY_MONEY_ID) {
plugin.giveMoney(p, reward);
msg += plugin.economyFormat(reward);
} else {
arena.getRewardManager().addReward((Player) damager, reward);
msg += MAUtils.toCamelCase(reward.getType().toString()) + ":" + reward.getAmount();
}
for (Player q : arena.getPlayersInArena()) {
Messenger.tell(q, msg);
}
}
}
}
callKillEvent(p, damagee);
}
if (!monsterExp) {
event.setDroppedExp(0);
}
event.getDrops().clear();
MABoss boss = monsters.removeBoss(damagee);
if (boss != null) {
List<ItemStack> drops = boss.getDrops();
if (drops != null && !drops.isEmpty()) {
event.getDrops().addAll(drops);
}
boss.setDead(true);
}
List<ItemStack> loot = monsters.getLoot(damagee);
if (loot != null && !loot.isEmpty()) {
event.getDrops().add(getRandomItem(loot));