// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.commandmacro;

import com.hypixel.hytale.server.core.Message;
import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.command.system.CommandContext;
import com.hypixel.hytale.server.core.command.system.arguments.types.ArgumentType;
import com.hypixel.hytale.server.core.command.system.arguments.types.ArgTypes;
import com.hypixel.hytale.server.core.command.system.arguments.system.RequiredArg;
import com.hypixel.hytale.server.core.command.system.basecommands.CommandBase;

public class EchoCommand extends CommandBase
{
    private final RequiredArg<String> messageArg;
    
    public EchoCommand() {
        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);
    }
    
    @Override
    protected void executeSync(@Nonnull final CommandContext context) {
        context.sender().sendMessage(Message.raw(this.messageArg.get(context).replace("\"", "")));
    }
}
