9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-24 01:19:28 +00:00
This commit is contained in:
Xiao-MoMi
2022-10-05 02:09:16 +08:00
parent a21ae65ea0
commit 984fbff8e8
39 changed files with 843 additions and 299 deletions

View File

@@ -26,14 +26,14 @@ public class PluginCommand implements TabExecutor {
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
List<String> argList = Arrays.asList(args);
if (argList.size() < 1) {
AdventureUtil.sendMessage(sender, MessageConfig.nonArgs);
AdventureUtil.sendMessage(sender, MessageConfig.prefix + MessageConfig.nonArgs);
return true;
}
SubCommand subCommand = subCommandMap.get(argList.get(0));
if (subCommand != null)
return subCommand.onCommand(sender, argList.subList(1, argList.size()));
else {
AdventureUtil.sendMessage(sender, MessageConfig.unavailableArgs);
AdventureUtil.sendMessage(sender, MessageConfig.prefix + MessageConfig.unavailableArgs);
return true;
}
}