mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-13 09:45:27 +02:00
Fix mmoinfo command
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||
import com.gmail.nossr50.listeners.InteractionManager;
|
||||
@@ -46,7 +45,7 @@ public class MmoInfoCommand implements TabExecutor {
|
||||
player.sendMessage(pluginRef.getLocaleManager().getString("Commands.MmoInfo.DetailsHeader"));
|
||||
player.sendMessage(pluginRef.getLocaleManager().getString("Commands.MmoInfo.Mystery"));
|
||||
return true;
|
||||
} else if (InteractionManager.getAbstractByName(args[0]) != null || PrimarySkillType.SUBSKILL_NAMES.contains(args[0])) {
|
||||
} else if (InteractionManager.getAbstractByName(args[0]) != null || pluginRef.getSkillTools().isSubSkillNameExact(args[0])) {
|
||||
displayInfo(player, args[0]);
|
||||
return true;
|
||||
}
|
||||
@@ -64,7 +63,7 @@ public class MmoInfoCommand implements TabExecutor {
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
switch (args.length) {
|
||||
case 1:
|
||||
return StringUtil.copyPartialMatches(args[0], PrimarySkillType.SUBSKILL_NAMES, new ArrayList<>(PrimarySkillType.SUBSKILL_NAMES.size()));
|
||||
return StringUtil.copyPartialMatches(args[0], pluginRef.getSkillTools().EXACT_SUBSKILL_NAMES, new ArrayList<>(pluginRef.getSkillTools().EXACT_SUBSKILL_NAMES.size()));
|
||||
default:
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
Reference in New Issue
Block a user