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 d3b3a8baca013909fa9c6204d964d7d7efeb2719..fb7c6621e2805f4339c255f6c2e02c55ff4c502e 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 @@ -64,6 +64,7 @@ public class PaperPluginMeta implements PluginMeta { private PermissionConfiguration permissionConfiguration = new PermissionConfiguration(PermissionDefault.OP, List.of()); @Required private ApiVersion apiVersion; + private boolean foliaSupported = false; // Folia private Map> dependencies = new EnumMap<>(PluginDependencyLifeCycle.class); @@ -251,6 +252,13 @@ public class PaperPluginMeta implements PluginMeta { return this.apiVersion.getVersionString(); } + // 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 0a27b468560ccf4b9588cd12d50c02e442f3024f..6369b13e1fcdbdb25dd9d6e4d3bffdedbee4f739 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