From c3ea632cb9479fa9f875c2171f9e50d0706d34b8 Mon Sep 17 00:00:00 2001 From: GJ Date: Mon, 9 Jul 2012 10:46:55 -0400 Subject: [PATCH] This should be private. --- .../com/gmail/nossr50/commands/general/XprateCommand.java | 6 +++++- .../java/com/gmail/nossr50/listeners/PlayerListener.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/general/XprateCommand.java b/src/main/java/com/gmail/nossr50/commands/general/XprateCommand.java index 502cf0b58..29bc6a8a2 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/XprateCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/general/XprateCommand.java @@ -14,7 +14,7 @@ import com.gmail.nossr50.util.Misc; public class XprateCommand implements CommandExecutor { private final mcMMO plugin; private static int oldrate = Config.getInstance().xpGainMultiplier; - public static boolean xpevent = false; + private static boolean xpevent = false; public XprateCommand (mcMMO plugin) { this.plugin = plugin; @@ -90,4 +90,8 @@ public class XprateCommand implements CommandExecutor { return true; } } + + public static boolean isXpEventRunning() { + return xpevent; + } } diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index a2be6e73b..816b0c4fd 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -183,7 +183,7 @@ public class PlayerListener implements Listener { } //THIS IS VERY BAD WAY TO DO THINGS, NEED BETTER WAY - if (XprateCommand.xpevent) { + if (XprateCommand.isXpEventRunning()) { player.sendMessage(LocaleLoader.getString("XPRate.Event", new Object[] {Config.getInstance().xpGainMultiplier})); } }