From 25061e7f71e756fab04ab6253e3c1186c54db848 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 12 Feb 2013 23:06:31 -0500 Subject: [PATCH] Don't loop, broadcast. --- .../gmail/nossr50/commands/admin/XprateCommand.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/admin/XprateCommand.java b/src/main/java/com/gmail/nossr50/commands/admin/XprateCommand.java index 970f6b1dd..78647a35c 100644 --- a/src/main/java/com/gmail/nossr50/commands/admin/XprateCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/admin/XprateCommand.java @@ -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));