3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-03 08:21:06 +02:00

Update Paper APIs to 1.19; fix ping passthrough for new Spigot+ builds (#3078)

Dieser Commit ist enthalten in:
Julian Vennen 2022-06-23 04:11:58 +02:00 committet von GitHub
Ursprung 08241b8bd8
Commit 3a5e5fe9f0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -36,13 +36,13 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<version>1.19-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-mojangapi</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<version>1.19-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>

Datei anzeigen

@ -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.

Datei anzeigen

@ -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