Bad variables names are bad.

This commit is contained in:
GJ 2012-07-09 10:47:33 -04:00
parent c3ea632cb9
commit d038cbf357

View File

@ -13,8 +13,8 @@ import com.gmail.nossr50.util.Misc;
public class XprateCommand implements CommandExecutor { public class XprateCommand implements CommandExecutor {
private final mcMMO plugin; private final mcMMO plugin;
private static int oldrate = Config.getInstance().xpGainMultiplier; private static int oldRate = Config.getInstance().xpGainMultiplier;
private static boolean xpevent = false; private static boolean xpEvent = false;
public XprateCommand (mcMMO plugin) { public XprateCommand (mcMMO plugin) {
this.plugin = plugin; this.plugin = plugin;
@ -33,16 +33,16 @@ public class XprateCommand implements CommandExecutor {
switch (args.length) { switch (args.length) {
case 1: case 1:
if (args[0].equalsIgnoreCase("reset")) { if (args[0].equalsIgnoreCase("reset")) {
if (xpevent) { if (xpEvent) {
for (Player x : plugin.getServer().getOnlinePlayers()) { for (Player x : plugin.getServer().getOnlinePlayers()) {
x.sendMessage(LocaleLoader.getString("Commands.xprate.over")); x.sendMessage(LocaleLoader.getString("Commands.xprate.over"));
} }
xpevent = !xpevent; xpEvent = !xpEvent;
Config.getInstance().xpGainMultiplier = oldrate; Config.getInstance().xpGainMultiplier = oldRate;
} }
else { else {
Config.getInstance().xpGainMultiplier = oldrate; Config.getInstance().xpGainMultiplier = oldRate;
} }
} }
else if (Misc.isInt(args[0])) { else if (Misc.isInt(args[0])) {
@ -56,10 +56,10 @@ public class XprateCommand implements CommandExecutor {
case 2: case 2:
if (Misc.isInt(args[0])) { if (Misc.isInt(args[0])) {
oldrate = Config.getInstance().xpGainMultiplier; oldRate = Config.getInstance().xpGainMultiplier;
if (args[1].equalsIgnoreCase("true") || args[1].equalsIgnoreCase("false")) { if (args[1].equalsIgnoreCase("true") || args[1].equalsIgnoreCase("false")) {
xpevent = Boolean.valueOf(args[1]); xpEvent = Boolean.valueOf(args[1]);
} }
else { else {
sender.sendMessage(usage3); sender.sendMessage(usage3);
@ -67,7 +67,7 @@ public class XprateCommand implements CommandExecutor {
Config.getInstance().xpGainMultiplier = Misc.getInt(args[0]); Config.getInstance().xpGainMultiplier = Misc.getInt(args[0]);
if (xpevent) { if (xpEvent) {
for (Player x : plugin.getServer().getOnlinePlayers()) { for (Player x : plugin.getServer().getOnlinePlayers()) {
x.sendMessage(LocaleLoader.getString("Commands.xprate.started.0")); x.sendMessage(LocaleLoader.getString("Commands.xprate.started.0"));
x.sendMessage(LocaleLoader.getString("Commands.xprate.started.1", new Object[] {Config.getInstance().xpGainMultiplier})); x.sendMessage(LocaleLoader.getString("Commands.xprate.started.1", new Object[] {Config.getInstance().xpGainMultiplier}));
@ -92,6 +92,6 @@ public class XprateCommand implements CommandExecutor {
} }
public static boolean isXpEventRunning() { public static boolean isXpEventRunning() {
return xpevent; return xpEvent;
} }
} }