forked from ChomeNS/chomens-bot-java
whatever useless shit idfk
This commit is contained in:
parent
bc58dbe5bc
commit
cff14ebf9e
3 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue