mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-24 01:19:28 +00:00
1.7-3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user