mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-27 20:58:40 +01:00
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:
parent
c59daae676
commit
404bc34e5f
@ -301,10 +301,7 @@ public class PlayerFaces {
|
|||||||
@Override
|
@Override
|
||||||
public void playerEvent(DynmapPlayer p) {
|
public void playerEvent(DynmapPlayer p) {
|
||||||
Runnable job = new LoadPlayerImages(p.getName(), p.getSkinURL(), p.getUUID(), core.skinUrlProvider);
|
Runnable job = new LoadPlayerImages(p.getName(), p.getSkinURL(), p.getUUID(), core.skinUrlProvider);
|
||||||
if(fetchskins)
|
|
||||||
MapManager.scheduleDelayedJob(job, 0);
|
MapManager.scheduleDelayedJob(job, 0);
|
||||||
else
|
|
||||||
job.run();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
storage = core.getDefaultMapStorage();
|
storage = core.getDefaultMapStorage();
|
||||||
|
Loading…
Reference in New Issue
Block a user