From b666930fe7f77c29a1171deb815afb8208d37def Mon Sep 17 00:00:00 2001 From: itqop Date: Sun, 10 Nov 2024 20:05:36 +0300 Subject: [PATCH] feat(release): v0.2.1 Rename mixin --- gradle.properties | 2 +- .../mixins/{MixinMessageCommand.java => MsgCommand.java} | 5 ++--- src/main/resources/chatit.mixins.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) rename src/main/java/org/itqop/chatit/mixins/{MixinMessageCommand.java => MsgCommand.java} (87%) diff --git a/gradle.properties b/gradle.properties index bb44261..6d2d2c1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -38,7 +38,7 @@ mod_name=ChatIT # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=All Rights Reserved # The mod version. See https://semver.org/ -mod_version=0.2-BETA +mod_version=0.2.1-BETA # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/org/itqop/chatit/mixins/MixinMessageCommand.java b/src/main/java/org/itqop/chatit/mixins/MsgCommand.java similarity index 87% rename from src/main/java/org/itqop/chatit/mixins/MixinMessageCommand.java rename to src/main/java/org/itqop/chatit/mixins/MsgCommand.java index 56db8dd..6df9518 100644 --- a/src/main/java/org/itqop/chatit/mixins/MixinMessageCommand.java +++ b/src/main/java/org/itqop/chatit/mixins/MsgCommand.java @@ -2,15 +2,14 @@ package org.itqop.chatit.mixins; import com.mojang.brigadier.CommandDispatcher; import net.minecraft.commands.CommandSourceStack; -import net.minecraft.server.commands.MsgCommand; import org.itqop.chatit.commands.ChatITCommand; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -@Mixin(MsgCommand.class) -public abstract class MixinMessageCommand { +@Mixin(net.minecraft.server.commands.MsgCommand.class) +public abstract class MsgCommand { @Inject(method = "register", at = @At("HEAD"), cancellable = true) private static void onRegister(CommandDispatcher dispatcher, CallbackInfo ci) { diff --git a/src/main/resources/chatit.mixins.json b/src/main/resources/chatit.mixins.json index a778e9d..8f8c4c0 100644 --- a/src/main/resources/chatit.mixins.json +++ b/src/main/resources/chatit.mixins.json @@ -4,7 +4,7 @@ "package": "org.itqop.chatit.mixins", "refmap": "chatit.refmap.json", "mixins": [ - "MixinMessageCommand" + "MsgCommand" ], "client": [], "server": []