Paper/patches/unapplied/server/0222-Add-CraftMagicNumbers.isSupportedApiVersion.patch
2022-12-07 17:46:46 +01:00

23 lines
1021 B
Diff

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 53eb440f1e2f9f9bbf2e67027414a3756d70cb6a..5cdf80e2a521bc665c9ff4474b91a2d683aa0eb8 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -431,6 +431,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
/**