Paper/patches/server/0500-Expose-protocol-version.patch

23 lines
1.0 KiB
Diff
Raw Permalink Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
2021-06-11 14:02:28 +02:00
Date: Fri, 26 Mar 2021 11:23:17 +0100
Subject: [PATCH] Expose protocol version
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 28948975c5adcf78d9c0e0b6fb63db981a369a77..25a206cf1eb07e826b549aacf9a4d0fbffb32177 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -543,6 +543,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
2024-04-27 01:43:59 +02:00
public String getMainLevelName() {
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
2021-06-11 14:02:28 +02:00
}
+
+ @Override
+ public int getProtocolVersion() {
+ return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
+ }
// Paper end
2024-10-27 18:11:15 +01:00
/**