mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
LocationChecker thread sleeps for a bit longer when no players are online.
This commit is contained in:
parent
9b47c1cb86
commit
220c5b0512
@ -38,8 +38,10 @@ namespace MCGalaxy {
|
||||
|
||||
void DoLocationChecks() {
|
||||
while (true) {
|
||||
Thread.Sleep(3);
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
Thread.Sleep(players.Length == 0 ? 16 : 3);
|
||||
players = PlayerInfo.Online.Items;
|
||||
|
||||
for (int i = 0; i < players.Length; i++) {
|
||||
try {
|
||||
Player p = players[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user