aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason Penilla <[email protected]>2024-05-22 10:36:09 -0700
committerJason Penilla <[email protected]>2024-05-22 10:36:09 -0700
commit4eb282bb53fb6221a0761f03496938039d235a96 (patch)
treed52745a0023b9ccc8578ba0f802ae2269a179b9f
parentb7606fca6995498cf2fdb4432fffca680c1fdbbf (diff)
downloadPaper-4eb282bb53fb6221a0761f03496938039d235a96.tar.gz
Paper-4eb282bb53fb6221a0761f03496938039d235a96.zip
Allow skipping the Bukkit/Spigot 'libraries' list.
By default, both the 'libraries' list and the 'paper-plugin-loader' will contribute libraries. It may be desired to only use one or the other. (i.e. 'libraries' on Spigot and 'paper-plugin-loader' on Paper)
-rw-r--r--patches/api/0478-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch22
1 files changed, 19 insertions, 3 deletions
diff --git a/patches/api/0478-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch b/patches/api/0478-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
index 07f14d4048..786865aa5f 100644
--- a/patches/api/0478-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
+++ b/patches/api/0478-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Allow Bukkit plugin to use Paper PluginLoader API
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
-index c0691a849831f99268fdcb7b0f471f80a1a2a70e..95df45f4042f80f25e923c2a170a79906212f459 100644
+index c0691a849831f99268fdcb7b0f471f80a1a2a70e..8f45caade7357bc55c6a90cfe0c3a2feb2d877ff 100644
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
@@ -259,6 +259,13 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
@@ -22,11 +22,27 @@ index c0691a849831f99268fdcb7b0f471f80a1a2a70e..95df45f4042f80f25e923c2a170a7990
// Paper start - oh my goddddd
/**
* Don't use this.
-@@ -1232,6 +1239,7 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
+@@ -1232,6 +1239,23 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
} else {
libraries = ImmutableList.<String>of();
}
-+ if (map.containsKey("paper-plugin-loader")) this.paperPluginLoader = map.get("paper-plugin-loader").toString(); // Paper - plugin loader api
++ // Paper start - plugin loader api
++ if (map.containsKey("paper-plugin-loader")) {
++ this.paperPluginLoader = map.get("paper-plugin-loader").toString();
++ }
++
++ /*
++ Allow skipping the Bukkit/Spigot 'libraries' list. By default, both the 'libraries'
++ list and the 'paper-plugin-loader' will contribute libraries. It may be desired to only
++ use one or the other. (i.e. 'libraries' on Spigot and 'paper-plugin-loader' on Paper)
++ */
++ if (map.containsKey("paper-skip-libraries")) {
++ String skip = map.get("paper-skip-libraries").toString();
++ if (skip.equalsIgnoreCase("true")) {
++ this.libraries = ImmutableList.of();
++ }
++ }
++ // Paper end - plugin loader api
try {
lazyPermissions = (Map<?, ?>) map.get("permissions");