From 39327a47b4a19d9bc13412f7b645dce7112aa50e Mon Sep 17 00:00:00 2001 From: 56738 Date: Wed, 27 Sep 2023 22:34:49 +0200 Subject: [PATCH] Fix CraftBukkitFacet on 1.20.2 --- .../net/kyori/adventure/platform/bukkit/CraftBukkitFacet.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform-bukkit/src/main/java/net/kyori/adventure/platform/bukkit/CraftBukkitFacet.java b/platform-bukkit/src/main/java/net/kyori/adventure/platform/bukkit/CraftBukkitFacet.java index bf9cb35f..67cdabaf 100644 --- a/platform-bukkit/src/main/java/net/kyori/adventure/platform/bukkit/CraftBukkitFacet.java +++ b/platform-bukkit/src/main/java/net/kyori/adventure/platform/bukkit/CraftBukkitFacet.java @@ -167,6 +167,10 @@ public boolean isSupported() { } } } + final Class serverCommonPacketListenerImpl = findClass(findMcClassName("server.network.ServerCommonPacketListenerImpl")); + if (serverCommonPacketListenerImpl != null) { + playerConnectionClass = serverCommonPacketListenerImpl; + } playerConnectionSendPacket = searchMethod(playerConnectionClass, Modifier.PUBLIC, new String[]{"sendPacket", "send"}, void.class, packetClass); } catch (final Throwable error) { logError(error, "Failed to initialize CraftBukkit sendPacket");