More work on migrating commands to new API

This commit is contained in:
nossr50
2020-12-23 15:29:39 -08:00
parent 537b120ffc
commit 9b9ffbb982
46 changed files with 352 additions and 341 deletions

View File

@@ -27,7 +27,7 @@ public class RankUtils {
*/
public static void executeSkillUnlockNotifications(@NotNull Plugin plugin, @NotNull OnlineMMOPlayer mmoPlayer, @NotNull PrimarySkillType primarySkillType, int newLevel)
{
for(SubSkillType subSkillType : primarySkillType.getSkillAbilities())
for(SubSkillType subSkillType : mcMMO.p.getSkillRegister().getSkillAbilities())
{
int playerRankInSkill = getRank(mmoPlayer, subSkillType);

View File

@@ -135,7 +135,7 @@ public final class SkillUtils {
* @return true if this is a valid skill, false otherwise
*/
public static boolean isSkill(@NotNull String skillName) {
return Config.getInstance().getLocale().equalsIgnoreCase("en_US") ? PrimarySkillType.getSkill(skillName) != null : isLocalizedSkill(skillName);
return Config.getInstance().getLocale().equalsIgnoreCase("en_US") ? mcMMO.p.getSkillRegister().getSkill(skillName) != null : isLocalizedSkill(skillName);
}
public static void sendSkillMessage(@NotNull Player player, @NotNull NotificationType notificationType, @NotNull String key) {