Class BrigadierUtil

java.lang.Object
org.incendo.cloud.brigadier.util.BrigadierUtil

@API(status=INTERNAL) public final class BrigadierUtil extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static <S> com.mojang.brigadier.tree.LiteralCommandNode<S>
    buildRedirect(@NonNull String alias, @NonNull com.mojang.brigadier.tree.CommandNode<S> destination)
    Returns a literal node that redirects its execution to the given destination node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • buildRedirect

      public static <S> com.mojang.brigadier.tree.LiteralCommandNode<S> buildRedirect(@NonNull String alias, @NonNull com.mojang.brigadier.tree.CommandNode<S> destination)
      Returns a literal node that redirects its execution to the given destination node.

      This method is taken from MIT licensed code in the Velocity project, see Velocity's BrigadierUtils class

      Type Parameters:
      S - brig sender type
      Parameters:
      alias - the command alias
      destination - the destination node
      Returns:
      the built node