refactor: show chomens mod verified message encrypted via chomens mod instead of tellraw

This commit is contained in:
ChomeNS
2025-05-01 11:48:07 +07:00
parent c8c82df0b4
commit 66ab8ceb07
3 changed files with 9 additions and 4 deletions

View File

@@ -48,11 +48,11 @@ public class AuthPlugin implements Listener {
.color(NamedTextColor.GREEN)
);
bot.chat.tellraw(
bot.chomeNSMod.sendMessage(
target,
Component
.text("You have been verified")
.color(NamedTextColor.GREEN),
target.profile.getId()
.color(NamedTextColor.GREEN)
);
}

View File

@@ -8,6 +8,7 @@ import me.chayapak1.chomens_bot.chomeNSMod.Packet;
import me.chayapak1.chomens_bot.chomeNSMod.PacketHandler;
import me.chayapak1.chomens_bot.chomeNSMod.Types;
import me.chayapak1.chomens_bot.chomeNSMod.clientboundPackets.ClientboundHandshakePacket;
import me.chayapak1.chomens_bot.chomeNSMod.clientboundPackets.ClientboundMessagePacket;
import me.chayapak1.chomens_bot.chomeNSMod.serverboundPackets.ServerboundRunCommandPacket;
import me.chayapak1.chomens_bot.chomeNSMod.serverboundPackets.ServerboundRunCoreCommandPacket;
import me.chayapak1.chomens_bot.chomeNSMod.serverboundPackets.ServerboundSuccessfulHandshakePacket;
@@ -302,4 +303,8 @@ public class ChomeNSModIntegrationPlugin implements Listener {
connectedPlayers.removeIf(player -> player.equals(target));
receivedParts.remove(target);
}
public void sendMessage (final PlayerEntry target, final Component message) {
send(target, new ClientboundMessagePacket(message));
}
}