Class CommandHelper
java.lang.Object
dev.upcraft.sparkweave.api.command.CommandHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.DynamicCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbroadcastToAdmins(net.minecraft.server.MinecraftServer server, net.minecraft.network.chat.Component message, boolean ignoreSendCommandFeedback, UUID... exclude) broadcast a message to server operatorsstatic voidbroadcastToAdmins(net.minecraft.server.MinecraftServer server, net.minecraft.network.chat.Component message, UUID... exclude) broadcast a message to server operatorsstatic <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 voidsendPathResult(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 aPathto the command source player (if any), and send thebaseMessageto every admin
-
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 aPathto the command source player (if any), and send thebaseMessageto 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 -
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- iftruewill ignore thesendCommandFeedbackgame ruleexclude- players to NOT send the message to, even if they are an operator
-