geforkt von Mirrors/Paper
ea855e2b46
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 Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Also, restore a patch that was dropped in the last upstream Bukkit Changes: 279eeab3 Fix command description not being set 96e2bb18 Remove debug print from SyntheticEventTest CraftBukkit Changes:d3ed1516
Fix dangerously threaded beacons217a293d
Don't relocate joptsimple to allow --help to work.1be05a21
Prepare for imminent Java 12 releasea49270b2
Mappings Update5259d80c
SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports Spigot Changes: e6eb36f2 Rebuild patches
61 Zeilen
2.3 KiB
Diff
61 Zeilen
2.3 KiB
Diff
From b7cacf36728e66ddc98dcf78bd25bca50f64c54c Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sun, 18 Nov 2018 19:44:54 +0000
|
|
Subject: [PATCH] Make the default permission message configurable
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
|
index 19fb0e5d2..6b0a09067 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1589,6 +1589,15 @@ public final class Bukkit {
|
|
return server.suggestPlayerNamesWhenNullTabCompletions();
|
|
}
|
|
|
|
+ /**
|
|
+ *
|
|
+ * @return the default no permission message used on the server
|
|
+ */
|
|
+ @NotNull
|
|
+ public static String getPermissionMessage() {
|
|
+ return server.getPermissionMessage();
|
|
+ }
|
|
+
|
|
/**
|
|
* Creates a PlayerProfile for the specified uuid, with name as null
|
|
* @param uuid UUID to create profile for
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index 1df58f72a..66d22ba79 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1392,6 +1392,13 @@ public interface Server extends PluginMessageRecipient {
|
|
*/
|
|
boolean suggestPlayerNamesWhenNullTabCompletions();
|
|
|
|
+ /**
|
|
+ *
|
|
+ * @return the default no permission message used on the server
|
|
+ */
|
|
+ @NotNull
|
|
+ String getPermissionMessage();
|
|
+
|
|
/**
|
|
* Creates a PlayerProfile for the specified uuid, with name as null
|
|
* @param uuid UUID to create profile for
|
|
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
|
index c2c19ed42..f0222fc27 100644
|
|
--- a/src/main/java/org/bukkit/command/Command.java
|
|
+++ b/src/main/java/org/bukkit/command/Command.java
|
|
@@ -187,7 +187,7 @@ public abstract class Command {
|
|
}
|
|
|
|
if (permissionMessage == null) {
|
|
- target.sendMessage(ChatColor.RED + "I'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is a mistake.");
|
|
+ target.sendMessage(Bukkit.getPermissionMessage()); // Paper
|
|
} else if (permissionMessage.length() != 0) {
|
|
for (String line : permissionMessage.replace("<permission>", permission).split("\n")) {
|
|
target.sendMessage(line);
|
|
--
|
|
2.21.0
|
|
|