Skip to content

Signed commands support #381

@demkom58

Description

@demkom58

Description

It would be nice to see an API for working with signed commands.

It also looks like Adventure in version 4.12 has the required API for this. FYI: SignedMessage.java

Motivation

In Minecraft, there are commands that allow you to write in private messages, as far as I understand, the command arguments are signed (FYI: Protocol#Chat_Command). For any use case that accepts player input and outputs, this would be a useful feature.

The first use case that comes to mind is message channels: global, local, etc.

Expected code

new CommandAPICommand(commandName)
     .withArguments(new AdventureSignedMessageArgument("message"))
     .executesPlayer((player, args) -> {
          final SignedMessage message = (SignedMessage) args[0];
          player.sendMessage(message, ChatType.CHAT.bind(Component.text("local")));
     }).register();

Extra details

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestimplemented for next releaseThis has been implemented in the current dev build for the next public release

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions