49 lines
3.8 KiB
Diff
49 lines
3.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <mrhua269@gmail.com>
|
|
Date: Sat, 18 Apr 2026 09:47:28 +0800
|
|
Subject: [PATCH] Add config to avoid of folia-supported check
|
|
|
|
This is in dangerous zone, we won't support it if you find any plugin bug if you enable it
|
|
|
|
Co-authored-by: Helvetica Volubi <88063803+suisuroru@users.noreply.github.com>
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/plugin/provider/type/paper/PaperPluginProviderFactory.java b/src/main/java/io/papermc/paper/plugin/provider/type/paper/PaperPluginProviderFactory.java
|
|
index 6369b13e1fcdbdb25dd9d6e4d3bffdedbee4f739..ea27ce9d08b3b8bbb0cd4918dbf51fd8077c3bb4 100644
|
|
--- a/src/main/java/io/papermc/paper/plugin/provider/type/paper/PaperPluginProviderFactory.java
|
|
+++ b/src/main/java/io/papermc/paper/plugin/provider/type/paper/PaperPluginProviderFactory.java
|
|
@@ -25,7 +25,7 @@ class PaperPluginProviderFactory implements PluginTypeFactory<PaperPluginParent,
|
|
@Override
|
|
public PaperPluginParent build(JarFile file, PaperPluginMeta configuration, Path source) {
|
|
// Folia start - block plugins not marked as supported
|
|
- if (!configuration.isFoliaSupported()) {
|
|
+ if (!configuration.isFoliaSupported() && !moe.monnairealms.camellia.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
|
throw new RuntimeException("Could not load plugin '" + configuration.getDisplayName() + "' as it is not marked as supporting Folia!");
|
|
}
|
|
// Folia end - block plugins not marked as supported
|
|
diff --git a/src/main/java/io/papermc/paper/plugin/provider/type/spigot/SpigotPluginProviderFactory.java b/src/main/java/io/papermc/paper/plugin/provider/type/spigot/SpigotPluginProviderFactory.java
|
|
index 6ef0042a355c65262bdb89dcf151bd644653216d..7da13c7a2c5303d8f3bee2db4b5b76a1e8ad1c74 100644
|
|
--- a/src/main/java/io/papermc/paper/plugin/provider/type/spigot/SpigotPluginProviderFactory.java
|
|
+++ b/src/main/java/io/papermc/paper/plugin/provider/type/spigot/SpigotPluginProviderFactory.java
|
|
@@ -27,7 +27,7 @@ class SpigotPluginProviderFactory implements PluginTypeFactory<SpigotPluginProvi
|
|
@Override
|
|
public SpigotPluginProvider build(JarFile file, PluginDescriptionFile configuration, Path source) throws InvalidDescriptionException {
|
|
// Folia start - block plugins not marked as supported
|
|
- if (!configuration.isFoliaSupported()) {
|
|
+ if (!configuration.isFoliaSupported() && !moe.monnairealms.camellia.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
|
throw new RuntimeException("Could not load plugin '" + configuration.getDisplayName() + "' as it is not marked as supporting Folia!");
|
|
}
|
|
// Folia end - block plugins not marked as supported
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
index 55a095e00bfe15321d8a1d69beb232e9956b0df7..844d6211ae34b3136806b8513e30d48c219884d9 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
@@ -323,7 +323,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
}
|
|
|
|
// Folia start - block plugins not marked as supported
|
|
- if (!descriptionFile.isFoliaSupported()) {
|
|
+ if (!descriptionFile.isFoliaSupported() && !moe.monnairealms.camellia.config.modules.unsupported.DisableCheckForFoliaSupported.disableForPaper) { // Shiroha - disable check for folia supported
|
|
throw new InvalidPluginException("Plugin " + descriptionFile.getFullName() + " is not marked as supporting regionised multithreading");
|
|
}
|
|
// Folia end - block plugins not marked as supported
|