CommandHelper

CommandHelper

46.5k Downloads

Offline Players Appearing in all_players(world)

LadyCailinBot opened this issue ยท 4 comments

commented

CMDHELPER-3106 - Reported by Murreey

When specifying world in the all_players() function, I'm getting 2 players that aren't online showing in the results. They don't show up in all_players() without a world. I've no idea what caused it, but we did crash last night around the time those players are usually on. They don't show up in any other worlds.

Running CommandHelper build #2916, and Spigot git-spigot-fdc1440-53fac9f

commented

Comment by PseudoKnight

all_players(world) finds all human entities, and thus picks up NPCs (fake players) as well. It's why I just use all_players(). Maybe we should just loop through all players and check their worlds in the function instead of getting players from the world.

commented

Comment by Murreey

There's no NPCs of either of those players in that world. Running it in a world with like 20 NPCs though just shows the real online players. Only one of the extra players has a NPC of themselves anywhere at all.

commented

Comment by PseudoKnight

Interesting. I also noticed that the player entities stick around for just a tad bit longer (after player quit) than players. So a player can be offline from all_players(world) in rare cases.

commented

Comment by PseudoKnight

This should be fixed now in build 2989.