aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-06-05 00:17:43 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-06-05 00:17:43 +0200
commit77f1cc5d8e96ac9e0d5f4ff0aedf3a735aaf4e48 (patch)
tree1a6ec7114c9ea7195a2ca03249a3d318c64573ca /src
parentbec5fbe8140835c1a8608ddaa5a9185fed5b0e7b (diff)
downloadskyhanni-77f1cc5d8e96ac9e0d5f4ff0aedf3a735aaf4e48.tar.gz
skyhanni-77f1cc5d8e96ac9e0d5f4ff0aedf3a735aaf4e48.tar.bz2
skyhanni-77f1cc5d8e96ac9e0d5f4ff0aedf3a735aaf4e48.zip
Fixed tab complete not showing up the island players
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/tabcomplete/PlayerTabComplete.kt10
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)
}
}
}