Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 11:30:06 +01:00
773dd72446
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 69c7ce23 PR-990: Use Mockito instead of InvocationHandler for test mocking 997de31d PR-893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping 6a8ce581 Fix malformed javadoc in previous commit 26c74f6d PR-890: Add more Sculk API (bloom, shriek, bloom event) aa067abf PR-895: Load GameEvent and MusicInstrument from registry CraftBukkit Changes: 78796c9de Add support for Java 21 ddc9a2dad SPIGOT-7475: Don't fire SculkBloomEvent during world generation caee2311a PR-1245: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping de421cf56 PR-1242: Add more Sculk API (bloom, shriek, bloom event) 00f5a80fb PR-1252: Fix error when generating a tree in water 10219df3a PR-1248: Load GameEvent and MusicInstrument from registry
41 Zeilen
2.2 KiB
Diff
41 Zeilen
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sun, 18 Nov 2018 19:49:56 +0000
|
|
Subject: [PATCH] Make the default permission message configurable
|
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
|
index 0dd48e4098191c8b6e29945d62bc473e9f3a1e77..ae51993e0de706cb62c96795ca9de7663893a5bf 100644
|
|
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
|
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
|
@@ -75,7 +75,7 @@ public final class PaperCommand extends Command {
|
|
if (sender.hasPermission(BASE_PERM + permission) || sender.hasPermission("bukkit.command.paper")) {
|
|
return true;
|
|
}
|
|
- sender.sendMessage(text("I'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is in error.", RED));
|
|
+ sender.sendMessage(Bukkit.permissionMessage());
|
|
return false;
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 2e64d43cdc25135fadb759ea503b26104b881968..4926f9f5eaf13b339ce2c2385faf9f4afba3d029 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2705,6 +2705,16 @@ public final class CraftServer implements Server {
|
|
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
|
}
|
|
|
|
+ @Override
|
|
+ public String getPermissionMessage() {
|
|
+ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().serialize(io.papermc.paper.configuration.GlobalConfiguration.get().messages.noPermission);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public net.kyori.adventure.text.Component permissionMessage() {
|
|
+ return io.papermc.paper.configuration.GlobalConfiguration.get().messages.noPermission;
|
|
+ }
|
|
+
|
|
@Override
|
|
public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) {
|
|
return createProfile(uuid, null);
|