mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00: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
3 changed files with 11 additions and 0 deletions
|
@ -473,4 +473,9 @@ public class Settings implements IConf
|
||||||
{
|
{
|
||||||
return config.getBoolean("debug", false);
|
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());
|
user.sendMessage("§7Smiting " + p.getDisplayName());
|
||||||
world.strikeLightning(p.getLocation());
|
world.strikeLightning(p.getLocation());
|
||||||
p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() -5);
|
p.setHealth(p.getHealth() < 5 ? 0 : p.getHealth() -5);
|
||||||
|
if(Essentials.getSettings().warnOnSmite())
|
||||||
|
{
|
||||||
p.sendMessage("§7You have just been smited");
|
p.sendMessage("§7You have just been smited");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
user.charge(this);
|
user.charge(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,9 @@ nether:
|
||||||
# Mob limit on spawnmob
|
# Mob limit on spawnmob
|
||||||
spawnmob-limit: 10
|
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.
|
# The message of the day, displayed on connect and by typing /motd.
|
||||||
motd:
|
motd:
|
||||||
- '&cWelcome, {PLAYER}&c!'
|
- '&cWelcome, {PLAYER}&c!'
|
||||||
|
|
Loading…
Reference in a new issue