2020-05-16 10:13:01 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
|
|
Date: Sat, 16 May 2020 10:12:15 +0200
|
|
|
|
Subject: [PATCH] Add option for console having all permissions
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
2020-11-18 04:45:18 +01:00
|
|
|
index ac6b291c103c432fdced603674345096326a9efe..7e577b889738a5d0b3e5be66d9266cdf01c70b1d 100644
|
2020-05-16 10:13:01 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
2020-11-09 01:09:37 +01:00
|
|
|
@@ -424,4 +424,9 @@ public class PaperConfig {
|
2020-07-05 08:12:14 +02:00
|
|
|
|
2020-05-16 10:13:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
+ public static boolean consoleHasAllPermissions = false;
|
|
|
|
+ private static void consoleHasAllPermissions() {
|
|
|
|
+ consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
2020-10-17 12:39:45 +02:00
|
|
|
index 089fe4a3458ed3106fa214f89a7004a5d3c6bb95..64d1ebf8db91cbf8c1430c80aa089aac49d6163b 100644
|
2020-05-16 10:13:01 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
2020-10-17 12:39:45 +02:00
|
|
|
@@ -80,4 +80,16 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co
|
2020-05-16 10:13:01 +02:00
|
|
|
public boolean isConversing() {
|
|
|
|
return conversationTracker.isConversing();
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public boolean hasPermission(String name) {
|
|
|
|
+ return com.destroystokyo.paper.PaperConfig.consoleHasAllPermissions || super.hasPermission(name);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public boolean hasPermission(org.bukkit.permissions.Permission perm) {
|
|
|
|
+ return com.destroystokyo.paper.PaperConfig.consoleHasAllPermissions || super.hasPermission(perm);
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
2020-06-26 03:58:00 +02:00
|
|
|
index 655bdbc37d0b95622206569229d4f4ea9496c69d..5562a7199f9b73d6af539360d4912d1dbde5d6cf 100644
|
2020-05-16 10:13:01 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
2020-06-26 03:58:00 +02:00
|
|
|
@@ -39,4 +39,16 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme
|
2020-05-16 10:13:01 +02:00
|
|
|
public void setOp(boolean value) {
|
|
|
|
throw new UnsupportedOperationException("Cannot change operator status of remote controller.");
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public boolean hasPermission(String name) {
|
|
|
|
+ return com.destroystokyo.paper.PaperConfig.consoleHasAllPermissions || super.hasPermission(name);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public boolean hasPermission(org.bukkit.permissions.Permission perm) {
|
|
|
|
+ return com.destroystokyo.paper.PaperConfig.consoleHasAllPermissions || super.hasPermission(perm);
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|