mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
Don't loop, broadcast.
This commit is contained in:
parent
0cd8d2b333
commit
25061e7f71
@ -27,10 +27,7 @@ public class XprateCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (mcMMO.p.isXPEventEnabled()) {
|
||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.xprate.over"));
|
||||
}
|
||||
|
||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.over"));
|
||||
mcMMO.p.toggleXpEventEnabled();
|
||||
}
|
||||
|
||||
@ -56,10 +53,8 @@ public class XprateCommand implements CommandExecutor {
|
||||
Config.getInstance().setExperienceGainsGlobalMultiplier(newXpRate);
|
||||
|
||||
if (mcMMO.p.isXPEventEnabled()) {
|
||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.xprate.started.0"));
|
||||
player.sendMessage(LocaleLoader.getString("Commands.xprate.started.1", newXpRate));
|
||||
}
|
||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.started.0"));
|
||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.started.1", newXpRate));
|
||||
}
|
||||
else {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.xprate.modified", newXpRate));
|
||||
|
Loading…
Reference in New Issue
Block a user