add hello

This commit is contained in:
ChomeNS 2023-03-27 14:09:57 +07:00
parent 1795eea74a
commit cbccbf2780

View file

@ -40,6 +40,13 @@ public class TrustedPlugin extends PlayersPlugin.PlayerListener {
public void playerJoined (MutablePlayerListEntry target) {
if (!trusted.contains(target.profile().getName())) return;
bot.chat().tellraw(
Component.empty()
.append(Component.text("Hello, ").color(NamedTextColor.GREEN))
.append(Component.text(target.profile().getName()).color(NamedTextColor.GOLD))
.append(Component.text("!").color(NamedTextColor.GREEN))
);
broadcast(
Component.translatable(
"Trusted player %s is now online",