mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 14:33:09 +01:00
Fix bundled spark permission check (#11355)
This commit is contained in:
parent
daecf055f5
commit
303dbb3695
1 changed files with 5 additions and 4 deletions
|
@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
// Paper end - Remap reflection
|
// Paper end - Remap reflection
|
||||||
+ // Paper start - spark
|
+ // Paper start - spark
|
||||||
+ implementation("me.lucko:spark-api:0.1-20240720.200737-2")
|
+ 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
|
+ // Paper end - spark
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import io.papermc.paper.plugin.provider.classloader.ConfiguredPluginClassLoader;
|
+import io.papermc.paper.plugin.provider.classloader.ConfiguredPluginClassLoader;
|
||||||
+import io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage;
|
+import io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage;
|
||||||
+import io.papermc.paper.util.MCUtil;
|
+import io.papermc.paper.util.MCUtil;
|
||||||
|
+import java.util.Collection;
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import java.util.logging.Level;
|
+import java.util.logging.Level;
|
||||||
+import java.util.logging.Logger;
|
+import java.util.logging.Logger;
|
||||||
|
@ -167,7 +168,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private void registerCommand(final Server server) {
|
+ 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() {
|
+ public void tickStart() {
|
||||||
|
@ -199,9 +200,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public static final class CommandImpl extends Command {
|
+ public static final class CommandImpl extends Command {
|
||||||
+ CommandImpl(final String name) {
|
+ CommandImpl(final String name, final Collection<String> permissions) {
|
||||||
+ super(name);
|
+ super(name);
|
||||||
+ this.setPermission("spark");
|
+ this.setPermission(String.join(";", permissions));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
|
Loading…
Reference in a new issue