Paper/patches/api/0278-Expose-protocol-version.patch
2022-11-22 20:53:50 -08:00

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 50397eecc867810ad6a89ce740814592082ad99e..3a515f13fe5ec6582ddeb38eb316e919062a0e16 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -180,5 +180,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
}