mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +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()) {
|
if (mcMMO.p.isXPEventEnabled()) {
|
||||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.over"));
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.xprate.over"));
|
|
||||||
}
|
|
||||||
|
|
||||||
mcMMO.p.toggleXpEventEnabled();
|
mcMMO.p.toggleXpEventEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,10 +53,8 @@ public class XprateCommand implements CommandExecutor {
|
|||||||
Config.getInstance().setExperienceGainsGlobalMultiplier(newXpRate);
|
Config.getInstance().setExperienceGainsGlobalMultiplier(newXpRate);
|
||||||
|
|
||||||
if (mcMMO.p.isXPEventEnabled()) {
|
if (mcMMO.p.isXPEventEnabled()) {
|
||||||
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.started.0"));
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.xprate.started.0"));
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.started.1", newXpRate));
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.xprate.started.1", newXpRate));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.xprate.modified", newXpRate));
|
sender.sendMessage(LocaleLoader.getString("Commands.xprate.modified", newXpRate));
|
||||||
|
Loading…
Reference in New Issue
Block a user