mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Make the default permission message configurable
This commit is contained in:
parent
4da5176b89
commit
f944b0b8d6
2 changed files with 11 additions and 1 deletions
|
@ -73,7 +73,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;
|
||||
}
|
||||
|
||||
|
|
|
@ -2900,6 +2900,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);
|
||||
|
|
Loading…
Reference in a new issue