diff options
Diffstat (limited to 'patches/server/0509-Expose-protocol-version.patch')
-rw-r--r-- | patches/server/0509-Expose-protocol-version.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/patches/server/0509-Expose-protocol-version.patch b/patches/server/0509-Expose-protocol-version.patch new file mode 100644 index 0000000000..37634ea475 --- /dev/null +++ b/patches/server/0509-Expose-protocol-version.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke <[email protected]> +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 7e538a5e742914aa496d76ffe5b450397367cf40..86584a2308006a5b217841a97461707ce610d32f 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +@@ -532,6 +532,11 @@ public final class CraftMagicNumbers implements UnsafeValues { + public String getMainLevelName() { + return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName; + } ++ ++ @Override ++ public int getProtocolVersion() { ++ return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion(); ++ } + // Paper end + + @Override |