diff --git a/src/main/java/org/shininet/bukkit/playerheads/PlayerHeadsListener.java b/src/main/java/org/shininet/bukkit/playerheads/PlayerHeadsListener.java index 216e4541..35852f5f 100644 --- a/src/main/java/org/shininet/bukkit/playerheads/PlayerHeadsListener.java +++ b/src/main/java/org/shininet/bukkit/playerheads/PlayerHeadsListener.java @@ -160,12 +160,14 @@ private void MobDeathHelper(EntityDeathEvent event, TexturedSkullType type, Doub Double dropchance = prng.nextDouble(); Player killer = event.getEntity().getKiller(); - if ((dropchance >= droprate) && ((killer == null) || !killer.hasPermission("playerheads.alwaysbeheadmob"))) { - return; - } - if (plugin.configFile.getBoolean("mobpkonly") && ((killer == null) || !killer.hasPermission("playerheads.canbeheadmob"))) { - return; + + if(killer!=null){//mob was PK'd + if(!killer.hasPermission("playerheads.canbeheadmob")) return;//killer does not have permission to behead mobs in any case + if(killer.hasPermission("playerheads.alwaysbeheadmob")) dropchance=0.0;//alwaysbehead should only modify drop chances + }else{//mob was killed by mob + if(plugin.configFile.getBoolean("mobpkonly")) return;//mobs must only be beheaded by players } + if(dropchance >= droprate) return; boolean usevanillaskull = plugin.configFile.getBoolean("dropvanillaheads");