diff options
author | KHobbits <rob@khobbits.co.uk> | 2011-12-08 02:23:18 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2011-12-08 02:23:18 +0000 |
commit | 221e1d3bb2940d1235604229b938b4d12e6d05e0 (patch) | |
tree | b9e025b6405521bc38eae4e121fedc9431d00132 | |
parent | 9410a25cce6c170ca13ea6b62d95b51ed3e3926c (diff) | |
parent | ae7d968f5c87c40a93f02f0cbd109245cb5c1443 (diff) | |
download | Essentials-221e1d3bb2940d1235604229b938b4d12e6d05e0.tar Essentials-221e1d3bb2940d1235604229b938b4d12e6d05e0.tar.gz Essentials-221e1d3bb2940d1235604229b938b4d12e6d05e0.tar.lz Essentials-221e1d3bb2940d1235604229b938b4d12e6d05e0.tar.xz Essentials-221e1d3bb2940d1235604229b938b4d12e6d05e0.zip |
Merge branch 'master' of github.com:essentials/Essentials
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Essentials.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Teleport.java | 5 | ||||
-rw-r--r-- | Essentials/src/config.yml | 1 | ||||
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java | 25 | ||||
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java | 2 | ||||
-rw-r--r-- | lib/bukkit-1.0.0-R1-SNAPSHOT.jar | bin | 4402721 -> 4402175 bytes | |||
-rw-r--r-- | lib/craftbukkit-1.0.0-SNAPSHOT.jar | bin | 9803490 -> 9808831 bytes |
7 files changed, 27 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index f0c22e557..10e6f9a4c 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -61,7 +61,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 1560; + public static final int BUKKIT_VERSION = 1566; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index c627279c4..9c21ffc6d 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -190,6 +190,11 @@ public class Teleport implements Runnable, ITeleport { cancel(false); } + + public void teleport(Location loc, Trade chargeFor) throws Exception + { + teleport(new Target(loc), chargeFor, TeleportCause.PLUGIN); + } public void teleport(Location loc, Trade chargeFor, TeleportCause cause) throws Exception { diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 460997345..019c0ef7a 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -409,6 +409,7 @@ protect: creeper-explosion: false creeper-playerdamage: false creeper-blockdamage: false + enderdragon-blockdamage: true enderman-pickup: false villager-death: false # Monsters won't follow players diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index fbbb321f3..89167b2b9 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -32,13 +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) { @@ -197,12 +197,23 @@ public class EssentialsProtectEntityListener extends EntityListener return; } final int maxHeight = ess.getSettings().getProtectCreeperMaxHeight(); - //Nicccccccccce plaaacccccccccce.. - if (event.getEntity() instanceof LivingEntity - && (prot.getSettingBool(ProtectConfig.prevent_creeper_explosion) - || prot.getSettingBool(ProtectConfig.prevent_creeper_blockdmg) - || (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight))) + + if (event.getEntity() instanceof EnderDragon + && prot.getSettingBool(ProtectConfig.prevent_enderdragon_blockdmg)) + { + if (prot.getSettingBool(ProtectConfig.enderdragon_fakeexplosions)) + { + FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers()); + } + event.setCancelled(true); + return; + } + else if (event.getEntity() instanceof Creeper + && (prot.getSettingBool(ProtectConfig.prevent_creeper_explosion) + || prot.getSettingBool(ProtectConfig.prevent_creeper_blockdmg) + || (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight))) { + //Nicccccccccce plaaacccccccccce.. FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers()); event.setCancelled(true); return; diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java index 817ad66af..bee8d0f4d 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java @@ -41,11 +41,13 @@ public enum ProtectConfig 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_enderdragon_blockdmg("protect.prevent.enderdragon-blockdamage", true), prevent_entitytarget("protect.prevent.entitytarget", false), protect_rails("protect.protect.rails", true), protect_below_rails("protect.protect.block-below", true), protect_signs("protect.protect.signs", true), protect_against_signs("protect.protect.block-below", true), + enderdragon_fakeexplosions("protect.enderdragon-fakeexplosions", false), alert_on_placement("protect.alert.on-placement"), alert_on_use("protect.alert.on-use"), alert_on_break("protect.alert.on-break"), diff --git a/lib/bukkit-1.0.0-R1-SNAPSHOT.jar b/lib/bukkit-1.0.0-R1-SNAPSHOT.jar Binary files differindex be0a1a49c..ddaaa3368 100644 --- a/lib/bukkit-1.0.0-R1-SNAPSHOT.jar +++ b/lib/bukkit-1.0.0-R1-SNAPSHOT.jar diff --git a/lib/craftbukkit-1.0.0-SNAPSHOT.jar b/lib/craftbukkit-1.0.0-SNAPSHOT.jar Binary files differindex 341b9750d..ab3f075ac 100644 --- a/lib/craftbukkit-1.0.0-SNAPSHOT.jar +++ b/lib/craftbukkit-1.0.0-SNAPSHOT.jar |