From dffc22674b2a5de9d922d5997e3a1b206786f5cb Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Tue, 8 Apr 2025 17:07:34 +0700 Subject: [PATCH] feat: show IP in ListCommand --- build-number.txt | 2 +- .../me/chayapak1/chomens_bot/commands/ListCommand.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build-number.txt b/build-number.txt index 987514dd..a7318fc0 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -2472 \ No newline at end of file +2474 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/ListCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/ListCommand.java index 302b79f1..66fdebc0 100644 --- a/src/main/java/me/chayapak1/chomens_bot/commands/ListCommand.java +++ b/src/main/java/me/chayapak1/chomens_bot/commands/ListCommand.java @@ -46,6 +46,7 @@ public class ListCommand extends Command { // Vanished: false // Latency: 32 // Game Mode: CREATIVE + // IP Address: 127.0.0.1 // // Click to copy the username to your clipboard // Shift+Click to insert the UUID into your chat box @@ -102,6 +103,15 @@ public class ListCommand extends Command { ).color(bot.colorPalette.secondary) ) .append(Component.newline()) + .append( + Component.translatable( + "IP Address: %s", + Component + .text(entry.ip == null ? "N/A" : entry.ip) + .color(bot.colorPalette.string) + ).color(bot.colorPalette.secondary) + ) + .append(Component.newline()) .append(Component.newline()) .append(Component.text("Click to copy the username to your clipboard").color(NamedTextColor.GREEN)) .append(Component.newline())