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})); } }