diff --git a/src/main/java/land/chipmunk/chipmunkbot/commands/RunCommand.java b/src/main/java/land/chipmunk/chipmunkbot/commands/EchoCommand.java similarity index 73% rename from src/main/java/land/chipmunk/chipmunkbot/commands/RunCommand.java rename to src/main/java/land/chipmunk/chipmunkbot/commands/EchoCommand.java index c5605fc..ce0329a 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/commands/RunCommand.java +++ b/src/main/java/land/chipmunk/chipmunkbot/commands/EchoCommand.java @@ -14,19 +14,18 @@ public class RunCommand extends Command { super(); this.node( - literal("run") + literal("echo") .then( - argument("command", greedyString()) - .executes(this::run) + argument("text", greedyString()) + .executes(this::echo) ) ); } - public int run (CommandContext context) { + public int echo (CommandContext context) { final CommandSource source = context.getSource(); - final ChipmunkBot client = source.client(); - - client.core().run(getString(context, "command")); + final String text = getString(context, "command"); + source.sendOutput(Component.text(text)); return 1; }