mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 14:35:11 +01:00
Fix bundled spark permission check (#11355)
This commit is contained in:
parent
ff251e42b6
commit
691d452643
1 changed files with 8 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue