@EventHandler(priority = EventPriority.LOWEST)
    @SuppressWarnings("unused")
    void onDamage(final EntityDamageEvent event) {
        Entity target = event.getEntity();
        if (event instanceof EntityDamageByEntityEvent) {
            Entity attacker = ((EntityDamageByEntityEvent) event).getDamager();
            if (target instanceof Player) {
                if (prevent(attacker, target, Flag.pvp, Message.error_pvp_disabled)) {
                    event.setCancelled(true);
                    return;
                }
            } else if (target instanceof Hanging) {
                if (attacker instanceof Projectile) {
                    Projectile projectile = (Projectile) attacker;
                    if (projectile.getShooter() instanceof Player) {
                        Player player = (Player) projectile.getShooter();
                        if (manager.prevent(target.getLocation(), player, Flag.build)) {
                            player.sendMessage(Translations.get(Message.error_region_protected));
                            event.setCancelled(true);
                            return;
                        }
                    }
                }
                if (manager.prevent(target.getLocation(), Flag.build)) {
                    event.setCancelled(true);
                    return;
                }
            }
        }
        if (manager.prevent(target.getLocation(), Flag.damage)) {
            event.setCancelled(true);
        }
    }