@EventHandler(priority = EventPriority.NORMAL)
    public void onEntityDeath(final EntityDeathEvent event) {
        final int i = ran.nextInt(100);
        final Entity entity = event.getEntity();
        if (!(entity instanceof Player)) {
            return;
        }
        final Player player = (Player) entity;
        final Location loc = player.getLocation();
        if (!player.hasPermission("monsterexplode.explode")) {
            return;
        }
        if (loc == null) {
            return;
        }
        if (!Variables.enabled) {
            player.sendMessage(ChatColor.RED
                    + "Exploding on death is currently disabled.");
            return;
        }
        if (api != null && loc != null) {
            if (api.isInRegion(loc)) {
                player.sendMessage(ChatColor.RED
                        + "You could not explode withn the protection region!");
                return;
            }
        }
        if (i <= Variables.randomnessFactor) {
            final World world = player.getWorld();
            if (Variables.prevent_block_damage) {
                locations.add(loc);
            }
            world.createExplosion(loc, Variables.size, true);
            player.sendMessage(ChatColor.RED + "You have exploded!");
        }
    }