本文整理汇总了Java中org.spongepowered.api.command.spec.CommandSpec.Builder类的典型用法代码示例。如果您正苦于以下问题:Java Builder类的具体用法?Java Builder怎么用?Java Builder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Builder类属于org.spongepowered.api.command.spec.CommandSpec包,在下文中一共展示了Builder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.arguments(GenericArguments.user(Text.of("player")))
.description(messageStorage.getMessage("command.remove.description"));
}
示例2: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.arguments(GenericArguments.string(Text.of("player")))
.description(messageStorage.getMessage("command.add.description"));
}
示例3: registerCommand
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
public Optional<CommandMapping> registerCommand(PluginContainer plugin, final List<String> commandNameAndAliases, String commandDescription, final CommandExecutor commandExecutor, CommandElement... args) {
final Builder builder = CommandSpec.builder();
if (!Strings.isNullOrEmpty(commandDescription))
builder.description(Text.of(commandDescription));
final CommandCallable spec = builder.arguments(args).executor(commandExecutor).build();
final Optional<CommandMapping> newCommand = game.getCommandManager().register(plugin, spec, commandNameAndAliases);
if (!newCommand.isPresent()) {
logger.error(commandNameAndAliases + " command could not be registered! :-(");
}
return newCommand;
}
示例4: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec
.builder()
.executor(this)
.arguments(GenericArguments.string(Text.of("singular")), GenericArguments.string(Text.of("plural")),
GenericArguments.string(Text.of("symbol")));
}
示例5: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec
.builder()
.executor(this)
.arguments(GenericArguments.string(Text.of("target")), GenericArguments.doubleNum(Text.of("amount")));
}
示例6: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec
.builder()
.executor(this)
.arguments(GenericArguments.string(Text.of("account")), GenericArguments.user(Text.of("target")),
GenericArguments.doubleNum(Text.of("amount")));
}
示例7: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.description(messageStorage.getMessage("command.info.description"));
}
示例8: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.description(messageStorage.getMessage("command.join.description"));
}
示例9: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.description(JobsLite.getMessageStorage().getMessage("command.create.description"));
}
示例10: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.description(messageStorage.getMessage("command.jobs.description"));
}
示例11: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.description(messageStorage.getMessage("command.delete.description"));
}
示例12: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.description(messageStorage.getMessage("command.leave.description"));
}
示例13: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this);
}
示例14: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.arguments(GenericArguments.string(Text.of("name")), GenericArguments.bool(Text.of("dedicated")))
.executor(this);
}
示例15: getCommandSpecBuilder
import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
return CommandSpec.builder()
.executor(this)
.arguments(GenericArguments.optional(GenericArguments.remainingJoinedStrings(Text.of("currency"))));
}