mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed JoinEventListener causing lag #467
This commit is contained in:
parent
b4deb1a9b4
commit
dcc0e87b44
@ -3,6 +3,7 @@ package main.java.com.djrapitops.plan.systems.cache;
|
|||||||
import com.djrapitops.plugin.api.utility.log.Log;
|
import com.djrapitops.plugin.api.utility.log.Log;
|
||||||
import main.java.com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import main.java.com.djrapitops.plan.data.container.Session;
|
import main.java.com.djrapitops.plan.data.container.Session;
|
||||||
|
import main.java.com.djrapitops.plan.systems.processing.Processor;
|
||||||
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@ -31,7 +32,12 @@ public class SessionCache {
|
|||||||
|
|
||||||
public void cacheSession(UUID uuid, Session session) {
|
public void cacheSession(UUID uuid, Session session) {
|
||||||
activeSessions.put(uuid, session);
|
activeSessions.put(uuid, session);
|
||||||
plugin.getInfoManager().cachePlayer(uuid);
|
plugin.addToProcessQueue(new Processor<Plan>(plugin) {
|
||||||
|
@Override
|
||||||
|
public void process() {
|
||||||
|
plugin.getInfoManager().cachePlayer(uuid);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void endSession(UUID uuid, long time) {
|
public void endSession(UUID uuid, long time) {
|
||||||
|
Loading…
Reference in New Issue
Block a user