Uses of Class
com.mclds.plugins.customplugin.registry.registrable.RegistrableCommand
Packages that use RegistrableCommand
Package
Description
-
Uses of RegistrableCommand in com.mclds.plugins.customplugin.registry
Methods in com.mclds.plugins.customplugin.registry that return types with arguments of type RegistrableCommandMethods in com.mclds.plugins.customplugin.registry with parameters of type RegistrableCommandModifier and TypeMethodDescriptionCommandRegistry.add(@Nullable CommandRegistry.CommandTester tester, RegistrableCommand... registrableCommands) CommandRegistry.add(RegistrableCommand... registrableCommands) -
Uses of RegistrableCommand in com.mclds.plugins.customplugin.registry.registrable
Methods in com.mclds.plugins.customplugin.registry.registrable that return RegistrableCommandModifier and TypeMethodDescription定义 TabComplete 提示的参数列表,每次调用都会添加一个参数列表,参数列表中的参数按照顺序排列
第一个调用的param函数,代表第一个参数所对应的提示列表
注意 addParam 和 defineParam 不能同时使用定义 TabComplete 提示的参数列表,每次调用都会添加一个参数列表,参数列表中的参数按照顺序排列
第一个调用的param函数,代表第一个参数所对应的提示列表
注意 addParam 和 defineParam 不能同时使用添加参数注释,调用顺序必须在 defineParam 之后 , addParam 不支持注释static RegistrableCommandRegistrableCommand.create()RegistrableCommand.defineParam(String key, String... values) 定义 TabComplete 提示参数名字, Key 为参数名,Value 为参数的提示列表 最终所提示的 TabComplete 为 Key=ValueRegistrableCommand.defineParam(String key, List<String> values) 定义 TabComplete 提示参数名字, Key 为参数名,Value 为参数的提示列表 最终所提示的 TabComplete 为 Key=Value描述RegistrableCommand.executor(RegistrableCommand.CommandExecutor executor) 设置执行器设置命令名, 真正执行的命令行为 /插件名:命令名RegistrableCommand.permissions(Permissions... permission) 指定此指令的权限RegistrableCommand.permissions(String... permission) 指定此指令的权限指定剩余参数的 TabComplete 提示 只有在全部参数都填写完毕后才会提示RegistrableCommand.tabComplete(RegistrableCommand.TabCompleteProvider tabCompleteProvider) 设置命令行自动补全器,尽量避免使用动态的补全器,因为会增加服务器的负担 可以使用 setParam 或者 addParam 设置静态参数 如果需要更新补全则 调用 /reload-plugin xxx 重载插件使用方法