Observer Connection is Lost
I used observer connection to connect to a player. The connection is reading the player info perfectly fine until the player is killed, then the connection is lost and I can't observe the player when it spawns back to the game. In order to read the player data again, I need to rerun the program or reconnect the observer connection after enough time that will guarantee the player is back in the game.
Is there a way to not lose the connection or automatically know when the player is back in the game so I can reconnect the connection?
I have another question, I can create a new post if you want me to. Is there any way to get the WorldView of the player using observer connection? I want to get the other visible players from the observed player's perspective. I tried
observer.getWorldView().getAllVisible(Player.class).values();
it returned all the players in the game even if the players were not able to see each other.
Thanks