本文整理了Java中org.bukkit.command.Command.toString()
方法的一些代码示例,展示了Command.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Command.toString()
方法的具体详情如下:
包路径:org.bukkit.command.Command
类名称:Command
方法名:toString
暂无
代码示例来源:origin: Bukkit/Bukkit
@Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder(super.toString());
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
stringBuilder.append(", ").append(owningPlugin.getDescription().getFullName()).append(')');
return stringBuilder.toString();
}
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public String toString() {
return cmd.toString();
}
代码示例来源:origin: SpigotMC/Spigot-API
@Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder(super.toString());
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
stringBuilder.append(", ").append(owningPlugin.getDescription().getFullName()).append(')');
return stringBuilder.toString();
}
}
代码示例来源:origin: artex-development/Lukkit
public void unregister() throws NoSuchFieldException, IllegalAccessException {
Object result = getPrivateField(Bukkit.getServer().getPluginManager(), "commandMap");
SimpleCommandMap commandMap = (SimpleCommandMap) result;
Object map = getPrivateField(commandMap, "knownCommands");
HashMap<String, Command> knownCommands = (HashMap<String, Command>) map;
knownCommands.remove(getName());
for (String alias : getAliases()) {
if (knownCommands.containsKey(alias) && knownCommands.get(alias).toString().contains(this.getName())) {
knownCommands.remove(alias);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!