本文整理汇总了Java中org.bukkit.command.MultipleCommandAlias类的典型用法代码示例。如果您正苦于以下问题:Java MultipleCommandAlias类的具体用法?Java MultipleCommandAlias怎么用?Java MultipleCommandAlias使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MultipleCommandAlias类属于org.bukkit.command包,在下文中一共展示了MultipleCommandAlias类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MultipleCommandAliasHelpTopic
import org.bukkit.command.MultipleCommandAlias; //导入依赖的package包/类
public MultipleCommandAliasHelpTopic(MultipleCommandAlias alias) {
this.alias = alias;
name = "/" + alias.getLabel();
// Build short text
StringBuilder sb = new StringBuilder();
for (int i = 0; i < alias.getCommands().length; i++) {
if (i != 0) {
sb.append(ChatColor.GOLD + " > " + ChatColor.WHITE);
}
sb.append("/");
sb.append(alias.getCommands()[i].getLabel());
}
shortText = sb.toString();
// Build full text
fullText = ChatColor.GOLD + "Alias for: " + ChatColor.WHITE + getShortText();
}
示例2: MultipleCommandAliasHelpTopic
import org.bukkit.command.MultipleCommandAlias; //导入依赖的package包/类
public MultipleCommandAliasHelpTopic(MultipleCommandAlias alias) {
this.alias = alias;
name = "/" + alias.getLabel();
// Build short text
StringBuilder sb = new StringBuilder();
for (int i = 0; i < alias.getCommands().length; i++) {
if (i != 0) {
sb.append(ChatColor.GOLD).append(" > ").append(ChatColor.WHITE);// >> /* https://pmd.github.io/pmd-5.4.1/pmd-java/rules/java/strings.html#InefficientStringBuffering */
}
sb.append('/');// 1 symbol ~ char
sb.append(alias.getCommands()[i].getLabel());
}
shortText = sb.toString();
// Build full text
fullText = ChatColor.GOLD + "Alias for: " + ChatColor.WHITE + getShortText();
}
示例3: createTopic
import org.bukkit.command.MultipleCommandAlias; //导入依赖的package包/类
public HelpTopic createTopic(MultipleCommandAlias multipleCommandAlias) {
return new MultipleCommandAliasHelpTopic(multipleCommandAlias);
}