|
1 | 1 | package com.datasiqn.commandcore;
|
2 | 2 |
|
3 |
| -import com.datasiqn.commandcore.argument.ListArguments; |
| 3 | +import com.datasiqn.commandcore.argument.StringArguments; |
4 | 4 | import com.datasiqn.commandcore.command.Command;
|
5 | 5 | import com.datasiqn.commandcore.command.TabComplete;
|
6 | 6 | import com.datasiqn.commandcore.managers.CommandManager;
|
@@ -41,7 +41,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull org.bukkit.comm
|
41 | 41 | }
|
42 | 42 | List<String> listArgs = new ArrayList<>(Arrays.asList(args));
|
43 | 43 | listArgs.remove(0);
|
44 |
| - Result<None, List<String>> output = cmd.execute(CommandCore.createContext(CommandCore.createSource(sender), cmd, args[0], new ListArguments(listArgs))); |
| 44 | + Result<None, List<String>> output = cmd.execute(CommandCore.createContext(CommandCore.createSource(sender), cmd, args[0], new StringArguments(listArgs))); |
45 | 45 | output.ifError(messages -> {
|
46 | 46 | for (String message : messages) sender.sendMessage(ChatColor.RED + message);
|
47 | 47 | sender.sendMessage(ChatColor.GRAY + "Usage(s):");
|
@@ -69,7 +69,7 @@ public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull org.bu
|
69 | 69 | if (cmd == null || (cmd.getPermissionString() != null && !sender.hasPermission(cmd.getPermissionString()))) return new ArrayList<>();
|
70 | 70 | List<String> listArgs = new ArrayList<>(Arrays.asList(args));
|
71 | 71 | listArgs.remove(0);
|
72 |
| - TabComplete complete = cmd.tabComplete(CommandCore.createContext(CommandCore.createSource(sender), cmd, args[0], new ListArguments(listArgs))); |
| 72 | + TabComplete complete = cmd.tabComplete(CommandCore.createContext(CommandCore.createSource(sender), cmd, args[0], new StringArguments(listArgs))); |
73 | 73 | matchingString = complete.getMatchingString();
|
74 | 74 | tabComplete.addAll(complete.values());
|
75 | 75 | }
|
|
0 commit comments