mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-01 21:24:43 +02:00
Changed AbilityTypes from enum to constants
This commit is contained in:
@ -98,7 +98,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case 2:
|
||||
return StringUtil.copyPartialMatches(args[1], SkillType.skillNames, new ArrayList<String>(SkillType.skillNames.size()));
|
||||
return StringUtil.copyPartialMatches(args[1], SkillType.getSkillNames(), new ArrayList<String>(SkillType.getSkillNames().size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
@ -125,7 +125,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
||||
|
||||
protected void editValues(Player player, PlayerProfile profile, SkillType skill, int value) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.nonChildSkills) {
|
||||
for (SkillType skillType : SkillType.getNonChildSkills()) {
|
||||
handleCommand(player, profile, skillType, value);
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ public class SkillresetCommand implements TabExecutor {
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case 2:
|
||||
return StringUtil.copyPartialMatches(args[1], SkillType.skillNames, new ArrayList<String>(SkillType.skillNames.size()));
|
||||
return StringUtil.copyPartialMatches(args[1], SkillType.getSkillNames(), new ArrayList<String>(SkillType.getSkillNames().size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
@ -148,7 +148,7 @@ public class SkillresetCommand implements TabExecutor {
|
||||
|
||||
protected void editValues(Player player, PlayerProfile profile, SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.nonChildSkills) {
|
||||
for (SkillType skillType : SkillType.getNonChildSkills()) {
|
||||
handleCommand(player, profile, skillType);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ public class HardcoreCommand extends HardcoreModeCommand {
|
||||
@Override
|
||||
protected boolean checkEnabled(SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.skillList) {
|
||||
for (SkillType skillType : SkillType.getSkillList()) {
|
||||
if (!skillType.getHardcoreStatLossEnabled()) {
|
||||
return false;
|
||||
}
|
||||
@ -52,7 +52,7 @@ public class HardcoreCommand extends HardcoreModeCommand {
|
||||
|
||||
private void toggle(boolean enable, SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.nonChildSkills) {
|
||||
for (SkillType skillType : SkillType.getNonChildSkills()) {
|
||||
skillType.setHardcoreStatLossEnabled(enable);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class VampirismCommand extends HardcoreModeCommand {
|
||||
@Override
|
||||
protected boolean checkEnabled(SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.skillList) {
|
||||
for (SkillType skillType : SkillType.getSkillList()) {
|
||||
if (!skillType.getHardcoreVampirismEnabled()) {
|
||||
return false;
|
||||
}
|
||||
@ -52,7 +52,7 @@ public class VampirismCommand extends HardcoreModeCommand {
|
||||
|
||||
private void toggle(boolean enable, SkillType skill) {
|
||||
if (skill == null) {
|
||||
for (SkillType skillType : SkillType.nonChildSkills) {
|
||||
for (SkillType skillType : SkillType.getNonChildSkills()) {
|
||||
skillType.setHardcoreVampirismEnabled(enable);
|
||||
}
|
||||
}
|
||||
|
@ -53,17 +53,17 @@ public class InspectCommand implements TabExecutor {
|
||||
sender.sendMessage(LocaleLoader.getString("Inspect.OfflineStats", playerName));
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Stats.Header.Gathering"));
|
||||
for (SkillType skill : SkillType.gatheringSkills) {
|
||||
for (SkillType skill : SkillType.getGatheringSkills()) {
|
||||
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Stats.Header.Combat"));
|
||||
for (SkillType skill : SkillType.combatSkills) {
|
||||
for (SkillType skill : SkillType.getCombatSkills()) {
|
||||
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Stats.Header.Misc"));
|
||||
for (SkillType skill : SkillType.miscSkills) {
|
||||
for (SkillType skill : SkillType.getMiscSkills()) {
|
||||
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class MccooldownCommand implements TabExecutor {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
||||
|
||||
for (AbilityType ability : AbilityType.values()) {
|
||||
for (AbilityType ability : AbilityType.getAbilities()) {
|
||||
if (!ability.getPermissions(player)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class MctopCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
return StringUtil.copyPartialMatches(args[0], SkillType.skillNames, new ArrayList<String>(SkillType.skillNames.size()));
|
||||
return StringUtil.copyPartialMatches(args[0], SkillType.getSkillNames(), new ArrayList<String>(SkillType.getSkillNames().size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
Reference in New Issue
Block a user