mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
fix: Blank ('') no-permission
messages shouldn't send blank lines (#5892)
This commit is contained in:
parent
2107b78f00
commit
fbc750341f
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue