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) {
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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() {
|
||||||
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user