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

24 lines
851 B
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
2021-06-11 14:02:28 +02:00
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 f79784e1823f646181a434a6dbce3bac0eaf25c9..a27e14e00d759d6c15530ef038bcf4b5cbd9f120 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -159,5 +159,12 @@ public interface UnsafeValues {
2021-06-11 14:02:28 +02:00
* @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
}