event.setCancelled(true);
} else if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.NODROPS)) {
War.war.badMsg(player, "drop.item.disabled");
event.setCancelled(true);
} else {
Item item = event.getItemDrop();
if (item != null) {
ItemStack itemStack = item.getItemStack();
if (itemStack != null && team.getKind().isTeamItem(itemStack)) {
// Can't drop your team's kind block
War.war.badMsg(player, "drop.team", team.getName());
event.setCancelled(true);
return;
}
if (zone.isNearWall(player.getLocation()) && itemStack != null) {
War.war.badMsg(player, "drop.item.border");
event.setCancelled(true);
return;
}
if (zone.getLoadoutSelections().keySet().contains(player.getName())
&& zone.getLoadoutSelections().get(player.getName()).isStillInSpawn()) {
// still at spawn
War.war.badMsg(player, "drop.item.spawn");
event.setCancelled(true);
return;
}
}
}
}
if (War.war.isWandBearer(player)) {
Item item = event.getItemDrop();
if (item.getItemStack().getType() == Material.WOOD_SWORD) {
String zoneName = War.war.getWandBearerZone(player);
War.war.removeWandBearer(player);
War.war.msg(player, "drop.wand", zoneName);
}
}