Add missing command completions for BungeeCord
This commit is contained in:
parent
7128b45ade
commit
0ed2b567c8
5 changed files with 23 additions and 8 deletions
|
|
@ -56,14 +56,7 @@ public class ServerUtils extends JavaPlugin implements CommandExecutor {
|
|||
completions.registerAsyncCompletion("plugins", context -> manager.getPluginNames());
|
||||
completions.registerAsyncCompletion("pluginJars", context -> manager.getPluginFileNames());
|
||||
completions.registerAsyncCompletion("supportedConfigs", context -> CommandServerUtils.getSupportedConfigs());
|
||||
completions.registerAsyncCompletion("commands", context -> {
|
||||
try {
|
||||
return RCommandMap.getKnownCommands(RCraftServer.getCommandMap()).keySet();
|
||||
} catch (IllegalAccessException | InvocationTargetException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return Collections.emptyList();
|
||||
});
|
||||
completions.registerAsyncCompletion("commands", context -> manager.getCommands());
|
||||
reload();
|
||||
|
||||
Bukkit.getPluginManager().registerEvents(new BukkitListener(), this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue