aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/unapplied/server/0499-Expose-protocol-version.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/unapplied/server/0499-Expose-protocol-version.patch')
-rw-r--r--patches/unapplied/server/0499-Expose-protocol-version.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/patches/unapplied/server/0499-Expose-protocol-version.patch b/patches/unapplied/server/0499-Expose-protocol-version.patch
new file mode 100644
index 0000000000..61d4fc32be
--- /dev/null
+++ b/patches/unapplied/server/0499-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 28948975c5adcf78d9c0e0b6fb63db981a369a77..25a206cf1eb07e826b549aacf9a4d0fbffb32177 100644
+--- 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 {
+ 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
+
+ /**