3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

Use configured no permission message in PaperCommand (#6484)

Dieser Commit ist enthalten in:
Jason 2021-08-25 15:34:15 -05:00 committet von GitHub
Ursprung 789bc79280
Commit b4ef78556c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -3,8 +3,20 @@ From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 18 Nov 2018 19:49:56 +0000
Subject: [PATCH] Make the default permission message configurable
TODO: Change the message in PaperCommand
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index 1fa190e098079522e0fe3593fa261c1b7ad4e24b..1eb45df9dca5d0c31ac46709e706136a246cb8ea 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -52,7 +52,7 @@ public class PaperCommand extends Command {
private static boolean testPermission(CommandSender commandSender, String permission) {
if (commandSender.hasPermission(BASE_PERM + permission) || commandSender.hasPermission("bukkit.command.paper")) return true;
- commandSender.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 in error."); // Sorry, kashike
+ commandSender.sendMessage(Bukkit.getPermissionMessage()); // Sorry, kashike
return false;
}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index cdec195a7aab9195c07ebfbba4f25b27a319ca6e..26de4e9daf0826b97a5f12304d7691dc815feee8 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java