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) {
if (issues.isEmpty()) {
return true;
}
for (String issue : issues) {
plugin.getLogger().warning(issue);
}
return false;
return issues.isEmpty();
}
}

View File

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

View File

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

View File

@ -88,21 +88,14 @@ public class RepairConfig extends ConfigLoader {
}
protected List<Repairable> getLoadedRepairables() {
if (repairables == null) {
return new ArrayList<Repairable>();
}
return repairables;
return repairables == null ? new ArrayList<Repairable>() : repairables;
}
private boolean noErrorsInRepairable(List<String> issues) {
if (issues.isEmpty()) {
return true;
}
for (String issue : issues) {
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 maxDurability = ModUtils.isCustomTool(inHand) ? ModUtils.getToolFromItemStack(inHand).getDurability() : inHandMaterial.getMaxDurability();
boolean overMax = (finalDurability >= maxDurability);
if (finalDurability >= maxDurability) {
inHand.setDurability(maxDurability);
return false;
}
inHand.setDurability(finalDurability);
return true;
inHand.setDurability(overMax ? maxDurability : finalDurability);
return overMax;
}
/**

View File

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