@EventHandler (priority = EventPriority.HIGH, ignoreCancelled = true)
    public void onItemFrameBreakEvent(EntityDamageByEntityEvent event) {

        if (event.getEntityType() != EntityType.ITEM_FRAME) {
            return;
        }

        final Player player;
        if (event.getDamager() instanceof Arrow) {
            final Arrow arrow = (Arrow) event.getDamager();
            if ((arrow.getShooter() != null) && (arrow.getShooter() instanceof Player)) {
                player = (Player) arrow.getShooter();
            } else {
                return;
            }
        } else if (event.getDamager() instanceof Player) {
            player = (Player) event.getDamager();
        } else {
            return;
        }

        final Block block = event.getEntity().getLocation().getBlock();
        if (!canBuild(player, block)) {
            final Town town = plugin.getTown(block.getChunk());
            if (town == null) {
                player.sendMessage(plugin.getLocalisation().get(LocalisationEntry.MSG_CANNOT_BUILD_HERE));
            } else {
                player.sendMessage(plugin.getLocalisation().get(LocalisationEntry.MSG_ONLY_TOWN_MEMBERS_CAN_BREAK_BLOCKS, town.getName()));
            }
            event.setCancelled(true);
        }
    }