mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
And a little more...
This commit is contained in:
parent
a82cc9609b
commit
5e00636761
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -56,11 +56,7 @@ public class McMMOHud {
|
||||
}
|
||||
|
||||
public boolean isMenuOpened() {
|
||||
if (menu != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return (menu != null);
|
||||
}
|
||||
|
||||
public void openMenu() {
|
||||
|
@ -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()))
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user