当前位置: 首页>>代码示例>>Java>>正文


Java Builder类代码示例

本文整理汇总了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"));
}
 
开发者ID:Flibio,项目名称:JobsLite,代码行数:8,代码来源:RemoveCommand.java

示例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"));
}
 
开发者ID:Flibio,项目名称:JobsLite,代码行数:8,代码来源:AddCommand.java

示例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;
}
 
开发者ID:vorburger,项目名称:SwissKnightMinecraft,代码行数:13,代码来源:CommandHelper.java

示例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")));
}
 
开发者ID:Flibio,项目名称:EconomyLite,代码行数:9,代码来源:CurrencyCreateCommand.java

示例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")));
}
 
开发者ID:Flibio,项目名称:EconomyLite,代码行数:8,代码来源:PayVirtualCommand.java

示例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")));
}
 
开发者ID:Flibio,项目名称:EconomyLite,代码行数:9,代码来源:VirtualPayCommand.java

示例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"));
}
 
开发者ID:Flibio,项目名称:JobsLite,代码行数:7,代码来源:InfoCommand.java

示例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"));
}
 
开发者ID:Flibio,项目名称:JobsLite,代码行数:7,代码来源:JoinCommand.java

示例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"));
}
 
开发者ID:Flibio,项目名称:JobsLite,代码行数:7,代码来源:CreateCommand.java

示例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"));
}
 
开发者ID:Flibio,项目名称:JobsLite,代码行数:7,代码来源:JobsCommand.java

示例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"));
}
 
开发者ID:Flibio,项目名称:JobsLite,代码行数:7,代码来源:DeleteCommand.java

示例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"));
}
 
开发者ID:Flibio,项目名称:JobsLite,代码行数:7,代码来源:LeaveCommand.java

示例13: getCommandSpecBuilder

import org.spongepowered.api.command.spec.CommandSpec.Builder; //导入依赖的package包/类
@Override
public Builder getCommandSpecBuilder() {
    return CommandSpec.builder()
            .executor(this);
}
 
开发者ID:FlibioStudio,项目名称:Ultimate-Spleef,代码行数:6,代码来源:SpleefCommand.java

示例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);
}
 
开发者ID:FlibioStudio,项目名称:Ultimate-Spleef,代码行数:7,代码来源:CreateCommand.java

示例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"))));
}
 
开发者ID:Flibio,项目名称:EconomyLite,代码行数:7,代码来源:CurrencyDeleteCommand.java


注:本文中的org.spongepowered.api.command.spec.CommandSpec.Builder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。