13
0
geforkt von Mirrors/Paper

fix: Blank ('') no-permission messages shouldn't send blank lines (#5892)

Dieser Commit ist enthalten in:
Underscore11 2021-06-20 18:50:36 -07:00
Ursprung 2107b78f00
Commit fbc750341f

Datei anzeigen

@ -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>", permission).split("\n")) {
target.sendMessage(line);