From b69173c767ffc4d0973ed9fa121b4dc7408eaee1 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sun, 1 Oct 2023 08:31:26 +0700 Subject: [PATCH] FIX PLAYER DISPLAY NAMES (MAJOR) --- .gitignore | 2 ++ .idea/modules.xml | 10 ---------- .../chayapak/chomens_bot/plugins/PlayersPlugin.java | 7 +------ 3 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 .idea/modules.xml diff --git a/.gitignore b/.gitignore index d4e74c2..f69a264 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ gradle-app.setting # Testing plugins /src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/testing +/.idea/modules/ +/.idea/modules.xml diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 03cdef8..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/PlayersPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/PlayersPlugin.java index 7b38601..72976e0 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/PlayersPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/PlayersPlugin.java @@ -1,6 +1,5 @@ package land.chipmunk.chayapak.chomens_bot.plugins; -import com.github.steveice10.mc.auth.data.GameProfile; import com.github.steveice10.mc.protocol.data.game.PlayerListEntry; import com.github.steveice10.mc.protocol.data.game.PlayerListEntryAction; import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode; @@ -92,11 +91,7 @@ public class PlayersPlugin extends Bot.Listener { public PlayerEntry getBotEntry () { return getEntry(bot.username); } private PlayerEntry getEntry (PlayerListEntry other) { - final GameProfile gameProfile = other.getProfile(); - - if (gameProfile == null) return null; - - return getEntry(gameProfile.getId()); + return getEntry(other.getProfileId()); } private void initializeChat (PlayerListEntry newEntry) {