From fbc750341fab401bb26b92826ff7e9c952130c42 Mon Sep 17 00:00:00 2001 From: Underscore11 Date: Sun, 20 Jun 2021 18:50:36 -0700 Subject: [PATCH] fix: Blank ('') `no-permission` messages shouldn't send blank lines (#5892) --- .../Make-the-default-permission-message-configurable.patch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/patches/api/Make-the-default-permission-message-configurable.patch b/patches/api/Make-the-default-permission-message-configurable.patch index 9910afea85..903e42a644 100644 --- a/patches/api/Make-the-default-permission-message-configurable.patch +++ b/patches/api/Make-the-default-permission-message-configurable.patch @@ -51,7 +51,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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 ++ // Paper start ++ String bukkitPermissionMessage = Bukkit.getPermissionMessage(); ++ if (org.apache.commons.lang.StringUtils.isNotBlank(bukkitPermissionMessage)) { ++ target.sendMessage(bukkitPermissionMessage); ++ } ++ // Paper end } else if (permissionMessage.length() != 0) { for (String line : permissionMessage.replace("", permission).split("\n")) { target.sendMessage(line);