mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Configurable permission message upgrades
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 15 Aug 2020 11:18:27 -0500
|
||||
Subject: [PATCH] Configurable permission message upgrades
|
||||
|
||||
This allows the configurable permission message in paper.yml to be blank and also support newlines
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index c10fc8d23..882c565ac 100644
|
||||
--- a/src/main/java/org/bukkit/command/Command.java
|
||||
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||
@@ -184,9 +184,13 @@ public abstract class Command {
|
||||
return true;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ String permissionMessage = this.permissionMessage;
|
||||
if (permissionMessage == null) {
|
||||
- target.sendMessage(Bukkit.getPermissionMessage()); // Paper
|
||||
- } else if (permissionMessage.length() != 0) {
|
||||
+ permissionMessage = Bukkit.getPermissionMessage();
|
||||
+ }
|
||||
+ if (permissionMessage.length() != 0) {
|
||||
+ // Purpur end
|
||||
for (String line : permissionMessage.replace("<permission>", permission).split("\n")) {
|
||||
target.sendMessage(line);
|
||||
}
|
||||
Reference in New Issue
Block a user