mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 11:16:02 +00:00
Better Effect List, Give and Remove Commands with Tab Completion
This commit is contained in:
1 parent
7a16cdf520
commit
f334980f22
2 files changed
+166
-84
No files matched your search
@@ -15,6 +15,8 @@ import noppes.npcs.scripted.CustomNPCsException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
|
||||
import static kamkeel.npcs.command.EffectCommand.getSortedEffectNames;
|
||||
|
||||
public class CommandKamkeel extends CommandBase{
|
||||
|
||||
public Map<String, CommandKamkeelBase> map = new HashMap<String, CommandKamkeelBase>();
|
||||
@@ -123,6 +125,9 @@ public class CommandKamkeel extends CommandBase{
|
||||
} else if (usage.equals("<requirement>")) {
|
||||
List<String> keys = new ArrayList<>(RequirementCheckerRegistry.getAllKeys());
|
||||
return CommandBase.getListOfStringsMatchingLastWord(args, keys.toArray(new String[keys.size()]));
|
||||
} else if(usage.equals("<effectName>")){
|
||||
List<String> keys = getSortedEffectNames();
|
||||
return CommandBase.getListOfStringsMatchingLastWord(args, keys.toArray(new String[keys.size()]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,5 +168,6 @@ public class CommandKamkeel extends CommandBase{
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user