Skip to content

Commit

Permalink
Fix Geyser booting on Spigot 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed Jun 7, 2022
1 parent 2595eae commit 5a1e6a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 6 additions & 1 deletion bootstrap/spigot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@
<pattern>me.lucko.commodore</pattern>
<shadedPattern>org.geysermc.geyser.platform.spigot.shaded.commodore</shadedPattern>
</relocation>
<relocation>
<!-- This is not used because relocating breaks natives, but we must include it
or else we get ClassDefNotFound after 1.18.2 -->
<pattern>io.netty.channel.kqueue</pattern>
<shadedPattern>org.geysermc.geyser.platform.spigot.shaded.io.netty.channel.kqueue</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
Expand All @@ -129,7 +135,6 @@
<!-- Needed because older Spigot builds do not provide the haproxy module -->
<exclude>io.netty:netty-transport-native-epoll:*</exclude>
<exclude>io.netty:netty-transport-native-unix-common:*</exclude>
<exclude>io.netty:netty-transport-native-kqueue:*</exclude>
<exclude>io.netty:netty-handler:*</exclude>
<exclude>io.netty:netty-common:*</exclude>
<exclude>io.netty:netty-buffer:*</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.viaversion.viaversion.api.data.MappingData;
import com.viaversion.viaversion.api.protocol.ProtocolPathEntry;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import io.netty.buffer.ByteBuf;
import me.lucko.commodore.CommodoreProvider;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
Expand Down Expand Up @@ -108,11 +109,9 @@ public void onEnable() {
}

try {
// Required for the Cloudburst Network dependency to initialize.
Class.forName("io.netty.channel.kqueue.KQueue");
} catch (ClassNotFoundException e) {
// While we could support these older versions, the downside is not having KQueue working at all
// And since there are alternative ways to get Geyser working for these aging platforms, it's not worth it.
// AvailableCommandsSerializer_v291 complains otherwise
ByteBuf.class.getMethod("writeShortLE", int.class);
} catch (NoSuchMethodException e) {
getLogger().severe("*********************************************");
getLogger().severe("");
getLogger().severe(GeyserLocale.getLocaleStringLog("geyser.bootstrap.unsupported_server.header"));
Expand Down

0 comments on commit 5a1e6a6

Please sign in to comment.