mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 08:35:44 +01:00
Merge branch 'master' of github.com:essentials/Essentials
This commit is contained in:
commit
4614d6d0dd
@ -57,7 +57,7 @@ import org.bukkit.scheduler.BukkitScheduler;
|
||||
|
||||
public class Essentials extends JavaPlugin implements IEssentials
|
||||
{
|
||||
public static final int BUKKIT_VERSION = 1518;
|
||||
public static final int BUKKIT_VERSION = 1522;
|
||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||
private transient ISettings settings;
|
||||
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
||||
|
@ -388,6 +388,7 @@ protect:
|
||||
creeper-playerdamage: false
|
||||
creeper-blockdamage: false
|
||||
enderman-pickup: false
|
||||
villager-death: false
|
||||
# Monsters won't follow players
|
||||
# permission essentials.protect.entitytarget.bypass disables this
|
||||
entitytarget: false
|
||||
|
@ -32,6 +32,13 @@ public class EssentialsProtectEntityListener extends EntityListener
|
||||
return;
|
||||
}
|
||||
final Entity target = event.getEntity();
|
||||
|
||||
if (target instanceof Villager && prot.getSettingBool(ProtectConfig.prevent_villager_death))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
final User user = ess.getUser(target);
|
||||
if (event instanceof EntityDamageByBlockEvent)
|
||||
{
|
||||
|
@ -40,6 +40,7 @@ public enum ProtectConfig
|
||||
prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false),
|
||||
prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false),
|
||||
prevent_enderman_pickup("protect.prevent.enderman-pickup", false),
|
||||
prevent_villager_death("protect.prevent.villager-death", false),
|
||||
prevent_entitytarget("protect.prevent.entitytarget", false),
|
||||
protect_rails("protect.protect.rails", true),
|
||||
protect_below_rails("protect.protect.block-below", true),
|
||||
|
Loading…
Reference in New Issue
Block a user