mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 9a129fa99 Add #getEligibleHumans to SkeletonHorseTrapEvent b5e23c7a6 Fix merging spawning values a932e8ad7 Turn off spigot verbose world by default 8ced89f65 Fix Delegation to vanilla chunk gen
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
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);
|
|
}
|