diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-21 16:58:02 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-21 16:58:02 +0000 |
commit | a86fbddc61598a49587a8051442b6780f102f9b8 (patch) | |
tree | ddf272bc283c76592f96fd8275247a407c9868e0 | |
parent | 5fbee1f39e226ef4d5dfb24e5263117f59d8c6f5 (diff) | |
download | Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.tar Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.tar.gz Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.tar.lz Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.tar.xz Essentials-a86fbddc61598a49587a8051442b6780f102f9b8.zip |
CB 697
Fixes spawning of web and new rails.
New config: Disable Lightning damage for players.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1258 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Essentials.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Settings.java | 1 | ||||
-rw-r--r-- | Essentials/src/config.yml | 3 | ||||
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java | 7 | ||||
-rw-r--r-- | lib/craftbukkit-0.0.1-SNAPSHOT.jar | bin | 7481536 -> 7483970 bytes |
5 files changed, 11 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index ee4159fce..2c99f1c67 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -25,7 +25,7 @@ import org.yaml.snakeyaml.reader.UnicodeReader; public class Essentials extends JavaPlugin { public static final String AUTHORS = "Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo and ceulemans."; - public static final int minBukkitBuildVersion = 689; + public static final int minBukkitBuildVersion = 697; private static final Logger logger = Logger.getLogger("Minecraft"); private static final Yaml yaml = new Yaml(new SafeConstructor()); private static Map<String, Object> users; diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 37f6b6e5e..d4a521f39 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -343,6 +343,7 @@ public class Settings implements IConf epPlayerSettings.put("protect.disable.contactdmg", config.getBoolean("protect.disable.contactdmg", false)); epPlayerSettings.put("protect.disable.firedmg", config.getBoolean("protect.disable.firedmg", false)); epPlayerSettings.put("protect.disable.build", config.getBoolean("protect.disable.build", false)); + epPlayerSettings.put("protect.disable.lightning", config.getBoolean("protect.disable.lightning", false)); return epPlayerSettings; } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 844c70075..e3d08693c 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -369,6 +369,9 @@ protect: # Burn, baby, burn! Should fire damage be disabled? firedmg: false + + # Should the damage after hit by a lightning be disabled? + lightning: false # Should people with build: false in permissions be allowed to build # Set true to disable building for those people diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index b0f0804cb..19c808d5f 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -111,7 +111,7 @@ public class EssentialsProtectEntityListener extends EntityListener return;
}
}
-
+
DamageCause cause = event.getCause();
Entity casualty = event.getEntity();
if (casualty instanceof Player)
@@ -138,6 +138,11 @@ public class EssentialsProtectEntityListener extends EntityListener event.setCancelled(true);
return;
}
+ if (EssentialsProtect.playerSettings.get("protect.disable.lightning") && cause == DamageCause.LIGHTNING)
+ {
+ event.setCancelled(true);
+ return;
+ }
}
}
diff --git a/lib/craftbukkit-0.0.1-SNAPSHOT.jar b/lib/craftbukkit-0.0.1-SNAPSHOT.jar Binary files differindex 1f05c47f4..9da49af24 100644 --- a/lib/craftbukkit-0.0.1-SNAPSHOT.jar +++ b/lib/craftbukkit-0.0.1-SNAPSHOT.jar |