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
This commit is contained in:
snowleo 2011-04-21 16:58:02 +00:00
parent 5fbee1f39e
commit a86fbddc61
5 changed files with 11 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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

View File

@ -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;
}
}
}

Binary file not shown.