mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Useless else statements.
This commit is contained in:
parent
9512879cc7
commit
900623461a
@ -121,15 +121,17 @@ public enum SkillType {
|
||||
public static SkillType getSkill(String skillName) {
|
||||
if (skillName.equalsIgnoreCase("powerlevel") || skillName.equalsIgnoreCase("all")) {
|
||||
return SkillType.ALL;
|
||||
} else {
|
||||
for(SkillType st : SkillType.values()) {
|
||||
if(st.name().equalsIgnoreCase(skillName))
|
||||
return st;
|
||||
}
|
||||
|
||||
for (SkillType type : SkillType.values()) {
|
||||
if (type.name().equalsIgnoreCase(skillName)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("[DEBUG] Invalid mcMMO skill (" + skillName + ")");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the skill level for this skill.
|
||||
|
@ -212,19 +212,18 @@ public class Leaderboard {
|
||||
List<PlayerStat> statsList = playerStatHash.get(skillType);
|
||||
|
||||
if (statsList != null) {
|
||||
for(PlayerStat ps : statsList) {
|
||||
if(ps.name.equalsIgnoreCase(playerName)) {
|
||||
return new int[] {currentPos, ps.statVal};
|
||||
} else {
|
||||
for (PlayerStat stat : statsList) {
|
||||
if (stat.name.equalsIgnoreCase(playerName)) {
|
||||
return new int[] {currentPos, stat.statVal};
|
||||
}
|
||||
|
||||
currentPos++;
|
||||
continue;
|
||||
}
|
||||
return new int[] {0};
|
||||
}
|
||||
|
||||
return new int[] {0};
|
||||
} else {
|
||||
return new int[] {0};
|
||||
}
|
||||
}
|
||||
|
||||
private static class SkillComparator implements Comparator<PlayerStat> {
|
||||
|
Loading…
Reference in New Issue
Block a user