From b5d374741021b590b97d30c6b62d4dbb3fcdab9d Mon Sep 17 00:00:00 2001 From: Chipmunk <65827213+chipmunkmc@users.noreply.github.com> Date: Thu, 19 Jan 2023 18:46:03 -0500 Subject: [PATCH] revert 701605739969331beec37cb67ce4bd2ab82d7c8c revert echo command --- .../commands/{EchoCommand.java => RunCommand.java} | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) rename src/main/java/land/chipmunk/chipmunkbot/commands/{EchoCommand.java => RunCommand.java} (73%) diff --git a/src/main/java/land/chipmunk/chipmunkbot/commands/EchoCommand.java b/src/main/java/land/chipmunk/chipmunkbot/commands/RunCommand.java similarity index 73% rename from src/main/java/land/chipmunk/chipmunkbot/commands/EchoCommand.java rename to src/main/java/land/chipmunk/chipmunkbot/commands/RunCommand.java index ce0329a..c5605fc 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/commands/EchoCommand.java +++ b/src/main/java/land/chipmunk/chipmunkbot/commands/RunCommand.java @@ -14,18 +14,19 @@ public class RunCommand extends Command { super(); this.node( - literal("echo") + literal("run") .then( - argument("text", greedyString()) - .executes(this::echo) + argument("command", greedyString()) + .executes(this::run) ) ); } - public int echo (CommandContext context) { + public int run (CommandContext context) { final CommandSource source = context.getSource(); - final String text = getString(context, "command"); - source.sendOutput(Component.text(text)); + final ChipmunkBot client = source.client(); + + client.core().run(getString(context, "command")); return 1; }