From e4d950251275998ff139f062acbf1248fdddcb32 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Tue, 23 Nov 2021 17:09:49 -0800 Subject: [PATCH] move extra plugins patch up & more work --- ...ine-option-to-load-extra-plugin-jars-no.patch | 16 ++++++++-------- patches/api/Adventure.patch | 2 ++ .../{unapplied => }/api/BlockDestroyEvent.patch | 0 ...ine-option-to-load-extra-plugin-jars-no.patch | 6 +++--- patches/server/Add-server-name-parameter.patch | 4 ++-- .../server/BlockDestroyEvent.patch | 0 6 files changed, 15 insertions(+), 13 deletions(-) rename patches/{unapplied => }/api/Add-command-line-option-to-load-extra-plugin-jars-no.patch (97%) rename patches/{unapplied => }/api/BlockDestroyEvent.patch (100%) rename patches/{unapplied => }/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch (96%) rename patches/{unapplied => }/server/BlockDestroyEvent.patch (100%) diff --git a/patches/unapplied/api/Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/api/Add-command-line-option-to-load-extra-plugin-jars-no.patch similarity index 97% rename from patches/unapplied/api/Add-command-line-option-to-load-extra-plugin-jars-no.patch rename to patches/api/Add-command-line-option-to-load-extra-plugin-jars-no.patch index 7ecd99f7ba..eda518a0a1 100644 --- a/patches/unapplied/api/Add-command-line-option-to-load-extra-plugin-jars-no.patch +++ b/patches/api/Add-command-line-option-to-load-extra-plugin-jars-no.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +0,0 @@ public final class Bukkit { - return server.getCurrentTick(); + return server; } + /** @@ -29,15 +29,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + /** - * Checks if the server is in the process of being shutdown. - * + * Attempts to set the {@link Server} singleton. + *

diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi - */ - int getCurrentTick(); +@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable; + */ + public interface Server extends PluginMessageRecipient { + /** + * Returns the de facto plugins directory, generally used for storing plugin jars to be loaded, @@ -52,8 +52,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + File getPluginsFolder(); + /** - * Checks if the server is in the process of being shutdown. - * + * Used for all administrative messages, such as an operator using a + * command. diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index 150646c460..97c389107e 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -767,6 +767,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +public interface Server extends PluginMessageRecipient, net.kyori.adventure.audience.ForwardingAudience { // Paper /** + * Returns the de facto plugins directory, generally used for storing plugin jars to be loaded, +@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient { * Used for all administrative messages, such as an operator using a * command. *

diff --git a/patches/unapplied/api/BlockDestroyEvent.patch b/patches/api/BlockDestroyEvent.patch similarity index 100% rename from patches/unapplied/api/BlockDestroyEvent.patch rename to patches/api/BlockDestroyEvent.patch diff --git a/patches/unapplied/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch similarity index 96% rename from patches/unapplied/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch rename to patches/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch index ef220be4a0..a07db7b59c 100644 --- a/patches/unapplied/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch +++ b/patches/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch @@ -70,9 +70,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { - .ofType(String.class) - .defaultsTo("Unknown Server") - .describedAs("Name"); + .ofType(File.class) + .defaultsTo(new File("paper.yml")) + .describedAs("Yml file"); + + acceptsAll(asList("add-plugin", "add-extra-plugin-jar"), "Specify paths to extra plugin jars to be loaded in addition to those in the plugins folder. This argument can be specified multiple times, once for each extra plugin jar path.") + .withRequiredArg() diff --git a/patches/server/Add-server-name-parameter.patch b/patches/server/Add-server-name-parameter.patch index 26efaf6478..464f41aaef 100644 --- a/patches/server/Add-server-name-parameter.patch +++ b/patches/server/Add-server-name-parameter.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -0,0 +0,0 @@ public class Main { - .defaultsTo(new File("paper.yml")) - .describedAs("Yml file"); + .defaultsTo(new File[] {}) + .describedAs("Jar file"); // Paper end + + // Paper start diff --git a/patches/unapplied/server/BlockDestroyEvent.patch b/patches/server/BlockDestroyEvent.patch similarity index 100% rename from patches/unapplied/server/BlockDestroyEvent.patch rename to patches/server/BlockDestroyEvent.patch