From d692fb15b03a42223ca7ef86abef4814094e2fa3 Mon Sep 17 00:00:00 2001 From: Rhys <98863820+rhysdh540@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:19:27 +0700 Subject: [PATCH] delet --- .../CommandContext/CommandContextExt.java | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 common/src/main/java/dev/rdh/createunlimited/extensions/com/mojang/brigadier/context/CommandContext/CommandContextExt.java diff --git a/common/src/main/java/dev/rdh/createunlimited/extensions/com/mojang/brigadier/context/CommandContext/CommandContextExt.java b/common/src/main/java/dev/rdh/createunlimited/extensions/com/mojang/brigadier/context/CommandContext/CommandContextExt.java deleted file mode 100644 index 291d5ff..0000000 --- a/common/src/main/java/dev/rdh/createunlimited/extensions/com/mojang/brigadier/context/CommandContext/CommandContextExt.java +++ /dev/null @@ -1,35 +0,0 @@ -package dev.rdh.createunlimited.extensions.com.mojang.brigadier.context.CommandContext; - -import manifold.ext.rt.api.Extension; -import manifold.ext.rt.api.This; -import manifold.rt.api.NoBootstrap; - -import net.minecraft.commands.CommandSourceStack; -import net.minecraft.network.chat.Component; - -import com.mojang.brigadier.context.CommandContext; - -@Extension -@NoBootstrap -@SuppressWarnings("unused") -public class CommandContextExt { - public static void message(@This CommandContext context, Component message) { - #if PRE_CURRENT_MC_1_19_2 - context.getSource().sendSuccess(message, false); - #elif POST_CURRENT_MC_1_20_1 - context.getSource().sendSuccess(() -> message, false); - #endif - } - - public static void message(@This CommandContext context, String message) { - context.message(Component.nullToEmpty(message)); - } - - public static void error(@This CommandContext context, Component message) { - context.getSource().sendFailure(message); - } - - public static void error(@This CommandContext context, String message) { - context.error(Component.nullToEmpty(message)); - } -} \ No newline at end of file