aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0222-Add-CraftMagicNumbers.isSupportedApiVersion.patch
blob: c90009e7309cbd9d06d38625350eafa44ef35d26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BlackHole <black-hole@live.com>
Date: Sun, 15 Dec 2019 19:12:39 +0100
Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion()


diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index df814f6bd071cef89cd4275e11aadc8311abd0f4..5893b764d3fceccef8704f1f90a5c826d6012166 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -426,6 +426,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
     public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
         return new com.destroystokyo.paper.PaperVersionFetcher();
     }
+
+    @Override
+    public boolean isSupportedApiVersion(String apiVersion) {
+        return apiVersion != null && SUPPORTED_API.contains(apiVersion);
+    }
     // Paper end
 
     /**