Class CommandHelper

java.lang.Object
dev.upcraft.sparkweave.api.command.CommandHelper

public class CommandHelper extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    broadcastToAdmins(net.minecraft.server.MinecraftServer server, net.minecraft.network.chat.Component message, boolean ignoreSendCommandFeedback, UUID... exclude)
    broadcast a message to server operators
    static void
    broadcastToAdmins(net.minecraft.server.MinecraftServer server, net.minecraft.network.chat.Component message, UUID... exclude)
    broadcast a message to server operators
    static <A extends com.mojang.brigadier.arguments.ArgumentType<?>, T extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<A>>
    net.minecraft.commands.synchronization.ArgumentTypeInfo<A,T>
    createArgumentInfo(Class<A> clazz, net.minecraft.commands.synchronization.ArgumentTypeInfo<A,T> info)
     
    static void
    sendPathResult(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, Path location, Supplier<net.minecraft.network.chat.Component> baseMessage, UnaryOperator<net.minecraft.network.chat.Component> pathMessage)
    Send a Path to the command source player (if any), and send the baseMessage to every admin

    Methods inherited from class java.lang.Object

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

    • IO_EXCEPTION

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType IO_EXCEPTION
  • Constructor Details

    • CommandHelper

      public CommandHelper()
  • Method Details

    • createArgumentInfo

      public static <A extends com.mojang.brigadier.arguments.ArgumentType<?>, T extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<A>> net.minecraft.commands.synchronization.ArgumentTypeInfo<A,T> createArgumentInfo(Class<A> clazz, net.minecraft.commands.synchronization.ArgumentTypeInfo<A,T> info)
    • sendPathResult

      public static void sendPathResult(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, Path location, Supplier<net.minecraft.network.chat.Component> baseMessage, UnaryOperator<net.minecraft.network.chat.Component> pathMessage) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Send a Path to the command source player (if any), and send the baseMessage to every admin
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • broadcastToAdmins

      public static void broadcastToAdmins(net.minecraft.server.MinecraftServer server, net.minecraft.network.chat.Component message, UUID... exclude)
      broadcast a message to server operators
      See Also:
    • broadcastToAdmins

      public static void broadcastToAdmins(net.minecraft.server.MinecraftServer server, net.minecraft.network.chat.Component message, boolean ignoreSendCommandFeedback, UUID... exclude)
      broadcast a message to server operators
      Parameters:
      ignoreSendCommandFeedback - if true will ignore the sendCommandFeedback game rule
      exclude - players to NOT send the message to, even if they are an operator