aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2')
-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)
}
}
}