From 41df66ed80d407a0c000ea3ffb0fea95fd289ff0 Mon Sep 17 00:00:00 2001 From: Xujiayao Date: Sun, 11 Feb 2024 00:26:57 +0800 Subject: [PATCH] Compat --- .../minecraft/mixins/MixinPlayerList.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/com/xujiayao/mcdiscordchat/minecraft/mixins/MixinPlayerList.java b/src/main/java/com/xujiayao/mcdiscordchat/minecraft/mixins/MixinPlayerList.java index 9c25853d..365a3336 100644 --- a/src/main/java/com/xujiayao/mcdiscordchat/minecraft/mixins/MixinPlayerList.java +++ b/src/main/java/com/xujiayao/mcdiscordchat/minecraft/mixins/MixinPlayerList.java @@ -49,18 +49,8 @@ private void broadcastChatMessage(PlayerChatMessage playerChatMessage, CommandSo //$$ MinecraftEvents.SERVER_MESSAGE.invoker().message(filteredText.filtered().serverContent().getString(), commandSourceStack); //$$ // TODO filtered() or raw() ? //$$ } - //#elseif MC > 11502 - //$$ @Inject(method = "broadcastMessage(Lnet/minecraft/network/chat/Component;Lnet/minecraft/network/chat/ChatType;Ljava/util/UUID;)V", at = @At("HEAD")) - //$$ private void broadcastMessage(Component component, ChatType chatType, UUID uUID, CallbackInfo ci) { - //$$ // TODO Check if need (uuid == Util.NIL_UUID) - //$$ MinecraftEvents.SERVER_MESSAGE.invoker().message(component.getString(), SERVER.createCommandSourceStack()); - //$$ } - //#else - //$$ @Inject(method = "broadcastMessage(Lnet/minecraft/network/chat/Component;)V", at = @At("HEAD")) - //$$ private void broadcastMessage(Component component, CallbackInfo ci) { - //$$ MinecraftEvents.SERVER_MESSAGE.invoker().message(component.getString(), SERVER.createCommandSourceStack()); - //$$ } //#endif + // TODO This feature has been removed in versions 1.18.2 and below due to compatibility issues (#197) @Inject(method = "placeNewPlayer", at = @At("RETURN")) //#if MC >= 12002