CommandSyntaxDSL

public final class CommandSyntaxDSL

Constructors

Link copied to clipboard
public CommandSyntaxDSL CommandSyntaxDSL(ArgumentBuilder<CommandSourceStack, ?> builder)

Properties

Link copied to clipboard
private ArgumentBuilder<CommandSourceStack, ?> builder
Link copied to clipboard

Functions

Link copied to clipboard
public final Unit executor(Function2<CommandExecutorContext, CommandSender, Unit> block)
public final Unit executor(Function3<CommandExecutorContext, CommandSender, CommandContext<CommandSourceStack>, Unit> block)
Link copied to clipboard
public final ArgumentBuilder<CommandSourceStack, ?> getBuilder()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public final Unit onlyConsole()

Adds a requirement to the command syntax that only allows the console to execute the command.

Link copied to clipboard
public final Unit onlyPlayers()

Adds a requirement to the command syntax that only allows players to execute the command.

Link copied to clipboard
public final Unit permission(String permission)

Adds a requirement to the command syntax that only allows senders with the specified permission to execute the command.

Link copied to clipboard
public final Unit requires(CommandCondition predicate)

Adds a requirement to the command syntax. If a requirement already exists, the new requirement will be combined with the existing one using a logical AND.

Link copied to clipboard
public final Unit setBuilder(ArgumentBuilder<CommandSourceStack, ?> value)
Link copied to clipboard
Link copied to clipboard
public final Unit setRequirement(CommandCondition value)