whatever useless shit idfk

This commit is contained in:
Chayapak 2023-09-07 19:56:51 +07:00
parent bc58dbe5bc
commit cff14ebf9e
3 changed files with 11 additions and 1 deletions

View file

@ -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) {

View file

@ -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

View file

@ -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);