mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
23826a3f66
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 01e22e09 Misc maven build updates 746f5324 #556: Allow sending messages from specific UUIDs 92b99cde #501: Add PersistentDataHolder to Chunk CraftBukkit Changes: 4ef13f94 Misc maven build updates 04639f5a #759: Allow sending messages from specific UUIDs 77c894a2 #672: Add PersistentDataHolder to Chunk Spigot Changes: 57bbdd8e Rebuild patches
62 lines
3 KiB
Diff
62 lines
3 KiB
Diff
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
|
|
index e750aedfad992635019d1abd7c880f4829b1e41d..d393e37f50e2815da6b486ff0c3e277fa3413f3e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -424,4 +424,9 @@ public class PaperConfig {
|
|
|
|
}
|
|
|
|
+ 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
|
|
index 089fe4a3458ed3106fa214f89a7004a5d3c6bb95..64d1ebf8db91cbf8c1430c80aa089aac49d6163b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
|
@@ -80,4 +80,16 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co
|
|
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
|
|
index 655bdbc37d0b95622206569229d4f4ea9496c69d..5562a7199f9b73d6af539360d4912d1dbde5d6cf 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
|
@@ -39,4 +39,16 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme
|
|
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
|
|
}
|