mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 10:41:41 +01:00
#993: Deprecate Command's permission message methods as they no longer work
Ever since Mojang's introduction of Brigadier in 1.13, the client is not sent any commands to which it does not have permission to execute. If a client executes a command it is not aware of (and consequently does not have permission for), the client will send itself instead of forwarding the failure to the server for its response. By: 2008Choco <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
c71ea48a49
commit
899f2acb84
1 changed files with 14 additions and 0 deletions
|
@ -314,7 +314,14 @@ public abstract class Command {
|
|||
* command
|
||||
*
|
||||
* @return Permission check failed message
|
||||
* @deprecated permission messages have not worked for player-executed
|
||||
* commands since 1.13 as clients without permission to execute a command
|
||||
* are unaware of its existence and therefore will not send an unknown
|
||||
* command execution to the server. This message will only ever be shown to
|
||||
* consoles or when this command is executed with
|
||||
* {@link Bukkit#dispatchCommand(CommandSender, String)}.
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
public String getPermissionMessage() {
|
||||
return permissionMessage;
|
||||
|
@ -378,7 +385,14 @@ public abstract class Command {
|
|||
* @param permissionMessage new permission message, null to indicate
|
||||
* default message, or an empty string to indicate no message
|
||||
* @return this command object, for chaining
|
||||
* @deprecated permission messages have not worked for player-executed
|
||||
* commands since 1.13 as clients without permission to execute a command
|
||||
* are unaware of its existence and therefore will not send an unknown
|
||||
* command execution to the server. This message will only ever be shown to
|
||||
* consoles or when this command is executed with
|
||||
* {@link Bukkit#dispatchCommand(CommandSender, String)}.
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
public Command setPermissionMessage(@Nullable String permissionMessage) {
|
||||
this.permissionMessage = permissionMessage;
|
||||
|
|
Loading…
Add table
Reference in a new issue