whatever useless shit idfk
This commit is contained in:
@@ -13,6 +13,8 @@ public class CommandContext {
|
||||
|
||||
public final boolean inGame;
|
||||
|
||||
public String commandName = null;
|
||||
|
||||
public String[] splitInput;
|
||||
|
||||
public CommandContext(Bot bot, String prefix, PlayerEntry sender, boolean inGame) {
|
||||
|
||||
@@ -20,7 +20,14 @@ public class PlayerCommandContext extends CommandContext {
|
||||
|
||||
@Override
|
||||
public void sendOutput (Component message) {
|
||||
bot.chat.tellraw(message, selector);
|
||||
bot.chat.tellraw(
|
||||
Component.translatable(
|
||||
"%s",
|
||||
message,
|
||||
Component.text("chomens_bot_command_output" + ((commandName != null) ? "_" + commandName : ""))
|
||||
),
|
||||
selector
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -157,6 +157,7 @@ public class CommandHandlerPlugin {
|
||||
if (!console && command.consoleOnly) return Component.text("This command can only be ran via console").color(NamedTextColor.RED);
|
||||
|
||||
context.splitInput = splitInput;
|
||||
context.commandName = command.name;
|
||||
|
||||
try {
|
||||
return command.execute(context, args, fullArgs);
|
||||
|
||||
Reference in New Issue
Block a user