public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
Entity defender = event.getEntity();
if (defender instanceof Player) {
Player defenderPlayer = (Player)defender;
if (ArenaManager.isInArena(defenderPlayer.getName())) {
Arena arena = ArenaManager.getArenaPlayerIsIn(defenderPlayer.getName());
if (!arena.getState().canPvP()) {
event.setCancelled(true);
}
}
}
}