You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ private net.kyori.adventure.text.Component permissionMessage; // Paper
1233
+
public co.aikar.timings.Timing timings; // Paper
1234
+
@NotNull public String getTimingName() {return getName();} // Paper
1235
+
1236
+
@@ -186,10 +186,10 @@ public abstract class Command {
1237
+
1238
+
if (permissionMessage == null) {
1239
+
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.");
1240
+
- } else if (permissionMessage.length() != 0) {
1241
+
- for (String line : permissionMessage.replace("<permission>", permission).split("\n")) {
1242
+
- target.sendMessage(line);
1243
+
- }
1244
+
+ // Paper start - use components for permissionMessage
1245
+
+ } else if (!permissionMessage.equals(net.kyori.adventure.text.Component.empty())) {
@@ -184,9 +184,10 @@ public abstract class Command {
49
+
@@ -184,10 +184,9 @@ public abstract class Command {
50
50
return true;
51
51
}
52
52
53
53
- if (permissionMessage == null) {
54
54
- 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.");
0 commit comments