Interface ICommandRegistrationHandler.CommandBuilder

All Superinterfaces:
Consumer<com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack>>
Enclosing interface:
ICommandRegistrationHandler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ICommandRegistrationHandler.CommandBuilder extends Consumer<com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack>>
Represents an operation that is responsible for construction of the command given a builder.

This is a functional interface whose functional method is Consumer.accept(Object). This interface effectively acts as a redefinition of Consumer albeit specialized for a specific use-case for better semantics.

Since:
9.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    buildCommand(com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> builder)
    Builds the command on the given builder.

    Methods inherited from interface java.util.function.Consumer

    accept, andThen
  • Method Details

    • buildCommand

      default void buildCommand(com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> builder)
      Builds the command on the given builder.

      Calling this method should be preferred to calling Consumer.accept(Object) to provide better semantics when dealing with the code.

      Parameters:
      builder - The builder on which the command should be built on.
      Since:
      9.1.0