aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0278-Expose-protocol-version.patch
blob: 79071d45af6ec11243594ff11c04a65a9fd9fbf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <jahnke.nassim@gmail.com>
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 9616630817a3a302636a0d2fe8076cb7244b7996..eadba6454530724619872034f6e680b4603b8a69 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -179,5 +179,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
 }