Refactor PlayerLoginProcessEvent

This is technically a breaking change, but I'm fairly sure I'm the only person using this event. It's quite obscure ;p
This commit is contained in:
Luck
2019-01-02 13:54:55 +00:00
Unverified
parent a0d04790a5
commit 6fc2321fad
7 changed files with 49 additions and 23 deletions
@@ -86,8 +86,8 @@ public class BukkitConnectionListener extends AbstractConnectionListener impleme
- setting up cached data. */
try {
User user = loadUser(e.getUniqueId(), e.getName());
this.plugin.getEventFactory().handleUserLoginProcess(e.getUniqueId(), e.getName(), user);
recordConnection(e.getUniqueId());
this.plugin.getEventFactory().handlePlayerLoginProcess(e.getUniqueId(), e.getName(), user);
} catch (Exception ex) {
this.plugin.getLogger().severe("Exception occurred whilst loading data for " + e.getUniqueId() + " - " + e.getName());
ex.printStackTrace();
@@ -95,6 +95,7 @@ public class BukkitConnectionListener extends AbstractConnectionListener impleme
// deny the connection
this.deniedAsyncLogin.add(e.getUniqueId());
e.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, Message.LOADING_DATABASE_ERROR.asString(this.plugin.getLocaleManager()));
this.plugin.getEventFactory().handlePlayerLoginProcess(e.getUniqueId(), e.getName(), null);
}
}