mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Update Paper APIs to 1.19; fix ping passthrough for new Spigot+ builds (#3078)
This commit is contained in:
parent
08241b8bd8
commit
3a5e5fe9f0
3 changed files with 5 additions and 5 deletions
|
@ -36,13 +36,13 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.papermc.paper</groupId>
|
<groupId>io.papermc.paper</groupId>
|
||||||
<artifactId>paper-api</artifactId>
|
<artifactId>paper-api</artifactId>
|
||||||
<version>1.18.1-R0.1-SNAPSHOT</version>
|
<version>1.19-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.papermc.paper</groupId>
|
<groupId>io.papermc.paper</groupId>
|
||||||
<artifactId>paper-mojangapi</artifactId>
|
<artifactId>paper-mojangapi</artifactId>
|
||||||
<version>1.18.1-R0.1-SNAPSHOT</version>
|
<version>1.19-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -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
|
// 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.
|
// runtime because we still have to shade in our own Adventure class. For now.
|
||||||
PaperServerListPingEvent event = new PaperServerListPingEvent(new GeyserStatusClient(inetSocketAddress),
|
PaperServerListPingEvent event = new PaperServerListPingEvent(new GeyserStatusClient(inetSocketAddress),
|
||||||
Bukkit.getMotd(), Bukkit.getOnlinePlayers().size(), Bukkit.getMaxPlayers(), Bukkit.getVersion(),
|
Bukkit.getMotd(), Bukkit.shouldSendChatPreviews(), Bukkit.getOnlinePlayers().size(),
|
||||||
MinecraftProtocol.getJavaProtocolVersion(), null);
|
Bukkit.getMaxPlayers(), Bukkit.getVersion(), MinecraftProtocol.getJavaProtocolVersion(), null);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
// We have to send a ping, so not really sure what else to do here.
|
// We have to send a ping, so not really sure what else to do here.
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class GeyserSpigotPingPassthrough implements IGeyserPingPassthrough {
|
||||||
private static class GeyserPingEvent extends ServerListPingEvent {
|
private static class GeyserPingEvent extends ServerListPingEvent {
|
||||||
|
|
||||||
public GeyserPingEvent(InetAddress address, String motd, int numPlayers, int maxPlayers) {
|
public GeyserPingEvent(InetAddress address, String motd, int numPlayers, int maxPlayers) {
|
||||||
super(address, motd, numPlayers, maxPlayers);
|
super(address, motd, Bukkit.shouldSendChatPreviews(), numPlayers, maxPlayers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue