Always run LoadPlayerImages task in the thread pool.

Prevents the main thread being blocked if the mysql connection is lost etc, when fetchskins is disabled.
This commit is contained in:
James Lyne 2021-10-01 13:44:29 +01:00
parent c59daae676
commit 404bc34e5f

View File

@ -301,10 +301,7 @@ public class PlayerFaces {
@Override
public void playerEvent(DynmapPlayer p) {
Runnable job = new LoadPlayerImages(p.getName(), p.getSkinURL(), p.getUUID(), core.skinUrlProvider);
if(fetchskins)
MapManager.scheduleDelayedJob(job, 0);
else
job.run();
MapManager.scheduleDelayedJob(job, 0);
}
});
storage = core.getDefaultMapStorage();