From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Wed, 29 Mar 2023 16:50:14 -0400 Subject: [PATCH] Require plugins to be explicitly marked as Folia supported diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java index 45bd29b70782e29eb11c36eaca0f940aee49799b..b930bd722caf6ecc6e2d584535cdd7a8924d9e08 100644 --- a/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java +++ b/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java @@ -60,6 +60,7 @@ public class PaperPluginMeta implements PluginMeta { @Required @PluginConfigConstraints.PluginVersion private String apiVersion; + private boolean foliaSupported = false; // Folia private Map> dependencies = new EnumMap<>(PluginDependencyLifeCycle.class); @@ -228,6 +229,13 @@ public class PaperPluginMeta implements PluginMeta { return this.apiVersion; } + // Folia start + @Override + public boolean isFoliaSupported() { + return this.foliaSupported; + } + // Folia end + @Override public @NotNull List getProvidedPlugins() { return this.provides; 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 84305ea4bd21acf0ff2415808933552696686ac7..7858c88ffc505b7b79155f9c95316f825c5ee575 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 @@ -24,6 +24,11 @@ class PaperPluginProviderFactory implements PluginTypeFactory