Paper/patches/api/0265-Expose-protocol-version.patch

24 lines
851 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Fri, 26 Mar 2021 11:23:27 +0100
Subject: [PATCH] Expose protocol version
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 22db1d8645a450308fe91d0cd100c926dd8c6f08..a3810c693d3748fba818e4a835ceb77762f433b9 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -184,5 +184,12 @@ public interface UnsafeValues {
* @return the itemstack rarity
*/
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
+
+ /**
+ * Returns the server's protocol version.
+ *
+ * @return the server's protocol version
+ */
+ int getProtocolVersion();
// Paper end
}