Implement onSessionLogin trigger for commands.yml (#1198)

* Implement onSessionLogin trigger for commands.yml

Needs test methods, @ljacqu any advice?

* Add simple onSessionLogin test
This commit is contained in:
Gabriele C
2017-05-19 19:21:05 +02:00
committed by GitHub
parent 4366e33508
commit cff8ccd76a
7 changed files with 46 additions and 3 deletions
@@ -123,6 +123,8 @@ public class AsynchronousJoin implements AsynchronousProcess {
// Session logic
if (canResumeSession(player)) {
service.send(player, MessageKey.SESSION_RECONNECTION);
// Run commands
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(() -> commandManager.runCommandsOnSessionLogin(player));
bukkitService.runTaskOptionallyAsync(() -> asynchronousLogin.forceLogin(player));
return;
}