Class BrigadierCommand

  • All Implemented Interfaces:
    Command

    public final class BrigadierCommand
    extends java.lang.Object
    implements Command
    A command that uses Brigadier for parsing the command and providing suggestions to the client.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int FORWARD
      Return code used by a Command to indicate the command execution should be forwarded to the backend server.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.mojang.brigadier.tree.LiteralCommandNode<CommandSource> getNode()
      Returns the literal node for this command.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FORWARD

        public static final int FORWARD
        Return code used by a Command to indicate the command execution should be forwarded to the backend server.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BrigadierCommand

        public BrigadierCommand​(com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSource> builder)
        Constructs a BrigadierCommand from the node returned by the given builder.
        Parameters:
        builder - the LiteralCommandNode builder
      • BrigadierCommand

        public BrigadierCommand​(com.mojang.brigadier.tree.LiteralCommandNode<CommandSource> node)
        Constructs a BrigadierCommand from the given command node.
        Parameters:
        node - the command node
    • Method Detail

      • getNode

        public com.mojang.brigadier.tree.LiteralCommandNode<CommandSource> getNode()
        Returns the literal node for this command.
        Returns:
        the command node