diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-05 00:17:43 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-05 00:17:43 +0200 |
commit | 77f1cc5d8e96ac9e0d5f4ff0aedf3a735aaf4e48 (patch) | |
tree | 1a6ec7114c9ea7195a2ca03249a3d318c64573ca /src/main/java/at/hannibal2/skyhanni/features | |
parent | bec5fbe8140835c1a8608ddaa5a9185fed5b0e7b (diff) | |
download | skyhanni-77f1cc5d8e96ac9e0d5f4ff0aedf3a735aaf4e48.tar.gz skyhanni-77f1cc5d8e96ac9e0d5f4ff0aedf3a735aaf4e48.tar.bz2 skyhanni-77f1cc5d8e96ac9e0d5f4ff0aedf3a735aaf4e48.zip |
Fixed tab complete not showing up the island players
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt index 6f1aef392..66029a4ee 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt @@ -4,8 +4,10 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.FriendAPI import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.events.RepositoryReloadEvent -import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.EntityUtils.isNPC import at.hannibal2.skyhanni.utils.jsonobjects.VipVisitsJson +import net.minecraft.client.Minecraft +import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object PlayerTabComplete { @@ -56,9 +58,9 @@ object PlayerTabComplete { if (config.islandPlayers) { if (PlayerCategory.ISLAND_PLAYERS !in ignored) { - for (name in originalArray) { - if (name != LorenzUtils.getPlayerName()) { - add(name) + for (entity in Minecraft.getMinecraft().theWorld.playerEntities) { + if (!entity.isNPC() && entity is EntityOtherPlayerMP) { + add(entity.name) } } } |