Files
chomens-bot-java/src/main/java/me/chayapak1/chomensbot_mabe/command/PlayerCommandContext.java
2023-03-18 18:04:06 +07:00

28 lines
649 B
Java

package me.chayapak1.chomensbot_mabe.command;
import lombok.Getter;
import me.chayapak1.chomensbot_mabe.Bot;
import net.kyori.adventure.text.Component;
public class PlayerCommandContext extends CommandContext {
@Getter private final String playerName;
private final Bot bot;
public PlayerCommandContext (Bot bot, String playerName) {
super(bot);
this.bot = bot;
this.playerName = playerName;
}
@Override
public void sendOutput (Component message) {
bot.chat().tellraw(message);
}
@Override
public Component displayName () {
return Component.text(playerName);
}
}