I have the QueryRegenerate event where I edit the player count. This is working. If a player of another server quits the server the main server gets a message to update the query (also working). But how can I now update the query? My idea: Login a kick a fake player?
Use a repeating task that runs every, let's say 30 seconds which will update the query rather than updating it only if a player joins or quits. It's a network so it'll be hard to keep a track of player joins and quits.
Is this what you want?: https://github.com/pmmp/PocketMine-...pocketmine/network/query/QueryHandler.php#L58