mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
We don't need two functions that do the exact same thing.
This commit is contained in:
@ -57,7 +57,7 @@ public class AddlevelsCommand implements CommandExecutor{
|
||||
}
|
||||
}
|
||||
else {
|
||||
profile.addLevels(SkillTools.getSkillType(args[0]), levels);
|
||||
profile.addLevels(SkillType.getSkill(args[0]), levels);
|
||||
}
|
||||
|
||||
if (allSkills) {
|
||||
@ -109,7 +109,7 @@ public class AddlevelsCommand implements CommandExecutor{
|
||||
}
|
||||
}
|
||||
else {
|
||||
profile.addLevels(SkillTools.getSkillType(args[1]), levels);
|
||||
profile.addLevels(SkillType.getSkill(args[1]), levels);
|
||||
}
|
||||
|
||||
profile.save(); // Since this is a temporary profile, we save it here.
|
||||
@ -129,7 +129,7 @@ public class AddlevelsCommand implements CommandExecutor{
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", levels));
|
||||
}
|
||||
else {
|
||||
profile.addLevels(SkillTools.getSkillType(args[1]), levels);
|
||||
profile.addLevels(SkillType.getSkill(args[1]), levels);
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", levels, Misc.getCapitalized(args[1])));
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class AddxpCommand implements CommandExecutor {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", xp));
|
||||
}
|
||||
else {
|
||||
mcMMOPlayer.applyXpGain(SkillTools.getSkillType(args[0]), xp);
|
||||
mcMMOPlayer.applyXpGain(SkillType.getSkill(args[0]), xp);
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", xp, Misc.getCapitalized(args[0])));
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ public class AddxpCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
else {
|
||||
profile.setSkillXpLevel(SkillTools.getSkillType(args[1]), xp);
|
||||
profile.setSkillXpLevel(SkillType.getSkill(args[1]), xp);
|
||||
}
|
||||
|
||||
profile.save(); // Since this is a temporary profile, we save it here.
|
||||
@ -126,7 +126,7 @@ public class AddxpCommand implements CommandExecutor {
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", xp));
|
||||
}
|
||||
else {
|
||||
mcMMOPlayer.applyXpGain(SkillTools.getSkillType(args[1]), xp);
|
||||
mcMMOPlayer.applyXpGain(SkillType.getSkill(args[1]), xp);
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", xp, Misc.getCapitalized(args[1])));
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ public class MmoeditCommand implements CommandExecutor {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.AllSkills.1", newValue));
|
||||
}
|
||||
else {
|
||||
profile.modifySkill(SkillTools.getSkillType(args[0]), newValue);
|
||||
profile.modifySkill(SkillType.getSkill(args[0]), newValue);
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", Misc.getCapitalized(args[0]), newValue));
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ public class MmoeditCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
else {
|
||||
profile.modifySkill(SkillTools.getSkillType(args[1]), newValue);
|
||||
profile.modifySkill(SkillType.getSkill(args[1]), newValue);
|
||||
}
|
||||
|
||||
profile.save(); // Since this is a temporary profile, we save it here.
|
||||
@ -125,7 +125,7 @@ public class MmoeditCommand implements CommandExecutor {
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.mmoedit.AllSkills.1", newValue));
|
||||
}
|
||||
else {
|
||||
profile.modifySkill(SkillTools.getSkillType(args[1]), newValue);
|
||||
profile.modifySkill(SkillType.getSkill(args[1]), newValue);
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", Misc.getCapitalized(args[1]), newValue));
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class SkillresetCommand implements CommandExecutor {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Reset.All"));
|
||||
}
|
||||
else {
|
||||
profile.modifySkill(SkillTools.getSkillType(args[0]), 0);
|
||||
profile.modifySkill(SkillType.getSkill(args[0]), 0);
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Reset.Single", Misc.getCapitalized(args[0])));
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ public class SkillresetCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
else {
|
||||
profile.modifySkill(SkillTools.getSkillType(args[1]), 0);
|
||||
profile.modifySkill(SkillType.getSkill(args[1]), 0);
|
||||
}
|
||||
|
||||
profile.save(); // Since this is a temporary profile, we save it here.
|
||||
@ -152,7 +152,7 @@ public class SkillresetCommand implements CommandExecutor {
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.Reset.All"));
|
||||
}
|
||||
else {
|
||||
profile.modifySkill(SkillTools.getSkillType(args[1]), 0);
|
||||
profile.modifySkill(SkillType.getSkill(args[1]), 0);
|
||||
mcMMOPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.Reset.Single", Misc.getCapitalized(args[1])));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user