Avoid a duplicate config call.

This commit is contained in:
GJ 2012-05-21 07:53:52 -04:00
parent 0d7c483bd5
commit d0cdc208e3

View File

@ -94,7 +94,7 @@ public class Misc {
return false; return false;
} }
} }
/** /**
* Simulate a block break event. * Simulate a block break event.
* *
@ -266,8 +266,10 @@ public class Misc {
} }
public static int getPowerLevelCap() { public static int getPowerLevelCap() {
if (Config.getInstance().getPowerLevelCap() > 0) { int levelCap = Config.getInstance().getPowerLevelCap();
return Config.getInstance().getPowerLevelCap();
if (levelCap > 0) {
return levelCap;
} }
else { else {
return Integer.MAX_VALUE; return Integer.MAX_VALUE;