mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 20:24:44 +02:00
SkillUtils cleanup, EventUtils creation
Move some functions in SkillUtils to more relevant locations. Begin work on utility class to handle all event calls.
This commit is contained in:
@ -23,7 +23,6 @@ import com.gmail.nossr50.util.commands.CommandUtils;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||
import com.gmail.nossr50.util.skills.PerksUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@ -46,7 +45,7 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
|
||||
public SkillCommand(SkillType skill) {
|
||||
this.skill = skill;
|
||||
skillName = SkillUtils.getSkillName(skill);
|
||||
skillName = skill.getSkillName();
|
||||
skillGuideCommand = new SkillGuideCommand(skill);
|
||||
}
|
||||
|
||||
@ -91,7 +90,7 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
Set<SkillType> parents = FamilyTree.getParents(skill);
|
||||
|
||||
for (SkillType parent : parents) {
|
||||
player.sendMessage(SkillUtils.getSkillName(parent) + " - " + LocaleLoader.getString("Effects.Level", profile.getSkillLevel(parent), profile.getSkillXpLevel(parent), profile.getXpToLevel(parent)));
|
||||
player.sendMessage(parent.getSkillName() + " - " + LocaleLoader.getString("Effects.Level", profile.getSkillLevel(parent), profile.getSkillXpLevel(parent), profile.getXpToLevel(parent)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@ import org.bukkit.command.CommandSender;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class SkillGuideCommand implements CommandExecutor {
|
||||
private String header;
|
||||
@ -19,7 +18,7 @@ public class SkillGuideCommand implements CommandExecutor {
|
||||
private String invalidPage;
|
||||
|
||||
public SkillGuideCommand(SkillType skillType) {
|
||||
header = LocaleLoader.getString("Guides.Header", SkillUtils.getSkillName(skillType));
|
||||
header = LocaleLoader.getString("Guides.Header", skillType.getSkillName());
|
||||
guide = getGuide(skillType);
|
||||
|
||||
invalidPage = LocaleLoader.getString("Guides.Page.Invalid");
|
||||
|
Reference in New Issue
Block a user