mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-26 19:17:43 +01:00
Fixed Processors not being called for Registered players.
This commit is contained in:
parent
80bc5650bc
commit
ee59c74bbb
@ -4,8 +4,7 @@ import com.djrapitops.plugin.utilities.player.Fetch;
|
|||||||
import main.java.com.djrapitops.plan.Plan;
|
import main.java.com.djrapitops.plan.Plan;
|
||||||
import main.java.com.djrapitops.plan.data.Session;
|
import main.java.com.djrapitops.plan.data.Session;
|
||||||
import main.java.com.djrapitops.plan.systems.cache.DataCache;
|
import main.java.com.djrapitops.plan.systems.cache.DataCache;
|
||||||
import main.java.com.djrapitops.plan.systems.info.InformationManager;
|
import main.java.com.djrapitops.plan.systems.processing.info.NetworkPageUpdateProcessor;
|
||||||
import main.java.com.djrapitops.plan.systems.processing.Processor;
|
|
||||||
import main.java.com.djrapitops.plan.systems.processing.player.*;
|
import main.java.com.djrapitops.plan.systems.processing.player.*;
|
||||||
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
import main.java.com.djrapitops.plan.utilities.MiscUtils;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -96,17 +95,14 @@ public class PlanPlayerListener implements Listener {
|
|||||||
|
|
||||||
cache.cacheSession(uuid, Session.start(time, world, gm));
|
cache.cacheSession(uuid, Session.start(time, world, gm));
|
||||||
|
|
||||||
|
IPUpdateProcessor ipUpdateProcessor = new IPUpdateProcessor(uuid, ip);
|
||||||
|
NameProcessor nameProcessor = new NameProcessor(uuid, playerName, displayName);
|
||||||
plugin.addToProcessQueue(
|
plugin.addToProcessQueue(
|
||||||
new RegisterProcessor(uuid, player.getFirstPlayed(), time, playerName, playersOnline,
|
new RegisterProcessor(uuid, player.getFirstPlayed(), time, playerName, playersOnline,
|
||||||
new IPUpdateProcessor(uuid, ip),
|
ipUpdateProcessor,
|
||||||
new NameProcessor(uuid, playerName, displayName)
|
nameProcessor
|
||||||
),
|
),
|
||||||
new Processor<InformationManager>(plugin.getInfoManager()) {
|
new NetworkPageUpdateProcessor(plugin.getInfoManager())
|
||||||
@Override
|
|
||||||
public void process() {
|
|
||||||
object.updateNetworkPageContent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Licence is provided in the jar as license.yml also here:
|
||||||
|
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||||
|
*/
|
||||||
|
package main.java.com.djrapitops.plan.systems.processing.info;
|
||||||
|
|
||||||
|
import main.java.com.djrapitops.plan.systems.info.InformationManager;
|
||||||
|
import main.java.com.djrapitops.plan.systems.processing.Processor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* //TODO Class Javadoc Comment
|
||||||
|
*
|
||||||
|
* @author Rsl1122
|
||||||
|
*/
|
||||||
|
public class NetworkPageUpdateProcessor extends Processor<InformationManager> {
|
||||||
|
|
||||||
|
public NetworkPageUpdateProcessor(InformationManager object) {
|
||||||
|
super(object);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void process() {
|
||||||
|
object.updateNetworkPageContent();
|
||||||
|
}
|
||||||
|
}
|
@ -57,7 +57,8 @@ public class RegisterProcessor extends PlayerProcessor {
|
|||||||
db.getActionsTable().insertAction(uuid, new Action(time, Actions.FIRST_SESSION, "Online: " + playersOnline + " Players"));
|
db.getActionsTable().insertAction(uuid, new Action(time, Actions.FIRST_SESSION, "Online: " + playersOnline + " Players"));
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
Log.toLog(this.getClass().getName(), e);
|
Log.toLog(this.getClass().getName(), e);
|
||||||
|
} finally {
|
||||||
|
plugin.addToProcessQueue(afterProcess);
|
||||||
}
|
}
|
||||||
plugin.addToProcessQueue(afterProcess);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user