geforkt von Mirrors/Paper
7a73ce03e9
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:
3108e64a SPIGOT-4193: API for selecting entities by strings
CraftBukkit Changes:
ad6070df
SPIGOT-4193: API for selecting entities by strings
59 Zeilen
2.3 KiB
Diff
59 Zeilen
2.3 KiB
Diff
From abcb626661610f113fe89edb1e31532f751b869e 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 4acaefa4c..9fab69137 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1493,6 +1493,14 @@ public final class Bukkit {
|
|
return server.suggestPlayerNamesWhenNullTabCompletions();
|
|
}
|
|
|
|
+ /**
|
|
+ *
|
|
+ * @return the default no permission message used on the server
|
|
+ */
|
|
+ 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 c940f6db9..ae15b0e99 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1293,6 +1293,12 @@ public interface Server extends PluginMessageRecipient {
|
|
*/
|
|
boolean suggestPlayerNamesWhenNullTabCompletions();
|
|
|
|
+ /**
|
|
+ *
|
|
+ * @return the default no permission message used on the server
|
|
+ */
|
|
+ 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 db7f44289..77171cd17 100644
|
|
--- a/src/main/java/org/bukkit/command/Command.java
|
|
+++ b/src/main/java/org/bukkit/command/Command.java
|
|
@@ -180,7 +180,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.20.1
|
|
|