3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00

Fix bundled spark permission check (#11355)

Dieser Commit ist enthalten in:
lucko 2024-09-06 20:41:54 +01:00 committet von GitHub
Ursprung ff251e42b6
Commit 691d452643
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Bundle spark
diff --git a/build.gradle.kts b/build.gradle.kts
index 1a734293c9416f13324bb0edf8f950c9029f8bc4..3588770a9ea6ee0a9508b218758650f43d994715 100644
index 1a734293c9416f13324bb0edf8f950c9029f8bc4..5e68a68d1ff920eb743795ae2048064a244a761c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -61,6 +61,10 @@ dependencies {
@ -14,17 +14,17 @@ index 1a734293c9416f13324bb0edf8f950c9029f8bc4..3588770a9ea6ee0a9508b218758650f4
// Paper end - Remap reflection
+ // Paper start - spark
+ implementation("me.lucko:spark-api:0.1-20240720.200737-2")
+ implementation("me.lucko:spark-paper:1.10.99-SNAPSHOT")
+ implementation("me.lucko:spark-paper:1.10.100-SNAPSHOT")
+ // Paper end - spark
}
paperweight {
diff --git a/src/main/java/io/papermc/paper/SparksFly.java b/src/main/java/io/papermc/paper/SparksFly.java
new file mode 100644
index 0000000000000000000000000000000000000000..19ee43e1ca053574a0151b4c43b01972183657e6
index 0000000000000000000000000000000000000000..2955b7ec9832a5752ea4aff9fc9d34ae2f9ee83e
--- /dev/null
+++ b/src/main/java/io/papermc/paper/SparksFly.java
@@ -0,0 +1,200 @@
@@ -0,0 +1,201 @@
+package io.papermc.paper;
+
+import io.papermc.paper.configuration.GlobalConfiguration;
@ -32,6 +32,7 @@ index 0000000000000000000000000000000000000000..19ee43e1ca053574a0151b4c43b01972
+import io.papermc.paper.plugin.provider.classloader.ConfiguredPluginClassLoader;
+import io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage;
+import io.papermc.paper.util.MCUtil;
+import java.util.Collection;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
@ -167,7 +168,7 @@ index 0000000000000000000000000000000000000000..19ee43e1ca053574a0151b4c43b01972
+ }
+
+ private void registerCommand(final Server server) {
+ server.getCommandMap().register(COMMAND_NAME, "paper", new CommandImpl(COMMAND_NAME));
+ server.getCommandMap().register(COMMAND_NAME, "paper", new CommandImpl(COMMAND_NAME, this.spark.getPermissions()));
+ }
+
+ public void tickStart() {
@ -199,9 +200,9 @@ index 0000000000000000000000000000000000000000..19ee43e1ca053574a0151b4c43b01972
+ }
+
+ public static final class CommandImpl extends Command {
+ CommandImpl(final String name) {
+ CommandImpl(final String name, final Collection<String> permissions) {
+ super(name);
+ this.setPermission("spark");
+ this.setPermission(String.join(";", permissions));
+ }
+
+ @Override