And a little more...

This commit is contained in:
GJ 2013-05-22 22:30:09 -04:00
parent a82cc9609b
commit 5e00636761
6 changed files with 11 additions and 35 deletions

View File

@ -442,13 +442,10 @@ public class TreasureConfig extends ConfigLoader {
} }
private boolean noErrorsInTreasure(List<String> issues) { private boolean noErrorsInTreasure(List<String> issues) {
if (issues.isEmpty()) {
return true;
}
for (String issue : issues) { for (String issue : issues) {
plugin.getLogger().warning(issue); plugin.getLogger().warning(issue);
} }
return false;
return issues.isEmpty();
} }
} }

View File

@ -56,11 +56,7 @@ public class McMMOHud {
} }
public boolean isMenuOpened() { public boolean isMenuOpened() {
if (menu != null) { return (menu != null);
return true;
}
return false;
} }
public void openMenu() { public void openMenu() {

View File

@ -381,11 +381,7 @@ public final class PartyManager {
* @return true if the player can invite * @return true if the player can invite
*/ */
public static boolean canInvite(Player player, Party party) { public static boolean canInvite(Player player, Party party) {
if (party.isLocked() && !party.getLeader().equalsIgnoreCase(player.getName())) { return !(party.isLocked() && !party.getLeader().equalsIgnoreCase(player.getName()))
return false;
}
return true;
} }
/** /**

View File

@ -88,21 +88,14 @@ public class RepairConfig extends ConfigLoader {
} }
protected List<Repairable> getLoadedRepairables() { protected List<Repairable> getLoadedRepairables() {
if (repairables == null) { return repairables == null ? new ArrayList<Repairable>() : repairables;
return new ArrayList<Repairable>();
}
return repairables;
} }
private boolean noErrorsInRepairable(List<String> issues) { private boolean noErrorsInRepairable(List<String> issues) {
if (issues.isEmpty()) {
return true;
}
for (String issue : issues) { for (String issue : issues) {
plugin.getLogger().warning(issue); plugin.getLogger().warning(issue);
} }
return false;
return issues.isEmpty();
} }
} }

View File

@ -230,14 +230,10 @@ public final class Woodcutting {
short finalDurability = (short) (inHand.getDurability() + durabilityLoss); short finalDurability = (short) (inHand.getDurability() + durabilityLoss);
short maxDurability = ModUtils.isCustomTool(inHand) ? ModUtils.getToolFromItemStack(inHand).getDurability() : inHandMaterial.getMaxDurability(); short maxDurability = ModUtils.isCustomTool(inHand) ? ModUtils.getToolFromItemStack(inHand).getDurability() : inHandMaterial.getMaxDurability();
boolean overMax = (finalDurability >= maxDurability);
if (finalDurability >= maxDurability) { inHand.setDurability(overMax ? maxDurability : finalDurability);
inHand.setDurability(maxDurability); return overMax;
return false;
}
inHand.setDurability(finalDurability);
return true;
} }
/** /**

View File

@ -591,9 +591,7 @@ public final class CombatUtils {
if (tamer instanceof Player) { if (tamer instanceof Player) {
Player owner = (Player) tamer; Player owner = (Player) tamer;
if (owner == attacker || PartyManager.inSameParty(attacker, owner)) { return (owner == attacker || PartyManager.inSameParty(attacker, owner));
return true;
}
} }
} }