From 3a5e5fe9f0a3fb8a542a5634443df2500d999883 Mon Sep 17 00:00:00 2001 From: Julian Vennen Date: Thu, 23 Jun 2022 04:11:58 +0200 Subject: [PATCH] Update Paper APIs to 1.19; fix ping passthrough for new Spigot+ builds (#3078) --- bootstrap/spigot/pom.xml | 4 ++-- .../geyser/platform/spigot/GeyserPaperPingPassthrough.java | 4 ++-- .../geyser/platform/spigot/GeyserSpigotPingPassthrough.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap/spigot/pom.xml b/bootstrap/spigot/pom.xml index 3b44c628f..0101e11ae 100644 --- a/bootstrap/spigot/pom.xml +++ b/bootstrap/spigot/pom.xml @@ -36,13 +36,13 @@ io.papermc.paper paper-api - 1.18.1-R0.1-SNAPSHOT + 1.19-R0.1-SNAPSHOT provided io.papermc.paper paper-mojangapi - 1.18.1-R0.1-SNAPSHOT + 1.19-R0.1-SNAPSHOT provided diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserPaperPingPassthrough.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserPaperPingPassthrough.java index 637091673..15bc693fb 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserPaperPingPassthrough.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserPaperPingPassthrough.java @@ -55,8 +55,8 @@ public final class GeyserPaperPingPassthrough implements IGeyserPingPassthrough // We'd rather *not* use deprecations here, but unfortunately any Adventure class would be relocated at // runtime because we still have to shade in our own Adventure class. For now. PaperServerListPingEvent event = new PaperServerListPingEvent(new GeyserStatusClient(inetSocketAddress), - Bukkit.getMotd(), Bukkit.getOnlinePlayers().size(), Bukkit.getMaxPlayers(), Bukkit.getVersion(), - MinecraftProtocol.getJavaProtocolVersion(), null); + Bukkit.getMotd(), Bukkit.shouldSendChatPreviews(), Bukkit.getOnlinePlayers().size(), + Bukkit.getMaxPlayers(), Bukkit.getVersion(), MinecraftProtocol.getJavaProtocolVersion(), null); Bukkit.getPluginManager().callEvent(event); if (event.isCancelled()) { // We have to send a ping, so not really sure what else to do here. diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPingPassthrough.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPingPassthrough.java index 63f335fae..db5a0a1e1 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPingPassthrough.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPingPassthrough.java @@ -66,7 +66,7 @@ public class GeyserSpigotPingPassthrough implements IGeyserPingPassthrough { private static class GeyserPingEvent extends ServerListPingEvent { public GeyserPingEvent(InetAddress address, String motd, int numPlayers, int maxPlayers) { - super(address, motd, numPlayers, maxPlayers); + super(address, motd, Bukkit.shouldSendChatPreviews(), numPlayers, maxPlayers); } @Override