package com.hypixel.hytale.builtin.commandmacro;
import com.hypixel.hytale.server.core.Message;
import com.hypixel.hytale.server.core.command.system.CommandContext;
import com.hypixel.hytale.server.core.command.system.arguments.system.RequiredArg;
import com.hypixel.hytale.server.core.command.system.arguments.types.ArgTypes;
import com.hypixel.hytale.server.core.command.system.basecommands.CommandBase;
import javax.annotation.Nonnull;
publicclassEchoCommandextendsCommandBase {
privatefinal RequiredArg<String> messageArg;
publicEchoCommand() {
super("echo", "Echos the text you input to the user");
this.messageArg = this.withRequiredArg("message", "The message to send to the user of this command", ArgTypes.STRING);
}
protectedvoidexecuteSync(@Nonnull CommandContext context) {
context.sender().sendMessage(Message.raw(((String)this.messageArg.get(context)).replace("\"", "")));
}
}