Skip to content

Advice and Reply classes

ancap-kun edited this page Feb 17, 2023 · 1 revision

Advice is a very simple CommandOperator that sends only one message to the player. Such small functionality has nowhere else to be used than to help the player execute a command, which is how Adviser got its name.

Advice can take the place of any Delegate or Arguments. This is one way to create it:

new Advice(new LAPIMessage(Artifex.class, "command.language.enter-language"))

In place of LAPIMessage can be any CallableMessage, discussed in Using CommunicatorAPI.

Reply is the same as Advice, but it asks for a message every time you enter a command. So you can give the player information about something, for example, about his balance, which can dynamically change and which cannot be defined once and for all when running the plugin.

Clone this wiki locally