本文整理了Java中org.bukkit.command.Command.tabComplete()
方法的一些代码示例,展示了Command.tabComplete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Command.tabComplete()
方法的具体详情如下:
包路径:org.bukkit.command.Command
类名称:Command
方法名:tabComplete
[英]Executed on tab completion for this command, returning a list of options the player can tab through.
[中]此命令在制表符完成时执行,返回玩家可以制表的选项列表。
代码示例来源:origin: EngineHub/WorldEdit
@Override
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
if (registeredWith instanceof CommandInspector) {
return ((TabCompleter) owner).onTabComplete(sender, this, alias, args);
} else {
return super.tabComplete(sender, alias, args);
}
}
代码示例来源:origin: Bukkit/Bukkit
return super.tabComplete(sender, alias, args);
代码示例来源:origin: Bukkit/Bukkit
return target.tabComplete(sender, commandName, args);
} catch (CommandException ex) {
throw ex;
代码示例来源:origin: OvercastNetwork/sk89q-command-framework
@Override
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
if(completer != null) {
final List<String> completions = completer.onTabComplete(sender, this, alias, args);
if(completions != null) {
return completions;
}
}
return super.tabComplete(sender, alias, args);
}
代码示例来源:origin: SpigotMC/Spigot-API
return target.tabComplete(sender, commandName, args);
} catch (CommandException ex) {
throw ex;
代码示例来源:origin: SpigotMC/Spigot-API
return super.tabComplete(sender, alias, args);
代码示例来源:origin: artex-development/Lukkit
@Override
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
List<String> def = super.tabComplete(sender, alias, args);
if (tabComleteFunction != null) {
LuaValue val = tabComleteFunction.invoke(
CoerceJavaToLua.coerce(sender),
CoerceJavaToLua.coerce(alias),
CoerceJavaToLua.coerce(args)
).arg1();
if (val != LuaValue.NIL) {
LuaTable tbl = val.checktable();
Object o = Utilities.convertTable(tbl);
if (o instanceof List)
return (List<String>) o;
}
}
return def;
}
内容来源于网络,如有侵权,请联系作者删除!