From 85a82242618bea0780652ee811630aa404dcfc6b Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 26 Mar 2021 11:23:17 +0100 Subject: [PATCH] Expose protocol version --- .../java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java index 8d9380b504..30f2ddb663 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/paper-server/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 /**