[trunk] add new config setting warn-on-smite: true setting this to false will not tell people they are smited when using /lightning

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1289 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
ementalo 2011-04-29 08:48:29 +00:00
parent 2b915e72fa
commit 94774a32ac
3 changed files with 11 additions and 0 deletions

View File

@ -473,4 +473,9 @@ public class Settings implements IConf
{
return config.getBoolean("debug", false);
}
public boolean warnOnSmite()
{
return config.getBoolean("warn-on-smite" ,true);
}
}

View File

@ -37,8 +37,11 @@ public class Commandlightning extends EssentialsCommand
user.sendMessage("§7Smiting " + p.getDisplayName());
world.strikeLightning(p.getLocation());
p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() -5);
if(Essentials.getSettings().warnOnSmite())
{
p.sendMessage("§7You have just been smited");
}
}
user.charge(this);
}
}

View File

@ -70,6 +70,9 @@ nether:
# Mob limit on spawnmob
spawnmob-limit: 10
#Shall we notify users when using /lightning
warn-on-smite: true
# The message of the day, displayed on connect and by typing /motd.
motd:
- '&cWelcome, {PLAYER}&c!'