mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
[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:
parent
2b915e72fa
commit
94774a32ac
@ -473,4 +473,9 @@ public class Settings implements IConf
|
||||
{
|
||||
return config.getBoolean("debug", false);
|
||||
}
|
||||
|
||||
public boolean warnOnSmite()
|
||||
{
|
||||
return config.getBoolean("warn-on-smite" ,true);
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,10 @@ 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);
|
||||
}
|
||||
|
@ -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!'
|
||||
|
Loading…
Reference in New Issue
Block a user