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
@@ -82,8 +82,8 @@ public class BungeeConnectionListener extends AbstractConnectionListener impleme
- setting up cached data. */
try {
User user = loadUser(c.getUniqueId(), c.getName());
this.plugin.getEventFactory().handleUserLoginProcess(c.getUniqueId(), c.getName(), user);
recordConnection(c.getUniqueId());
this.plugin.getEventFactory().handlePlayerLoginProcess(c.getUniqueId(), c.getName(), user);
} catch (Exception ex) {
this.plugin.getLogger().severe("Exception occurred whilst loading data for " + c.getUniqueId() + " - " + c.getName());
ex.printStackTrace();
@@ -94,6 +94,7 @@ public class BungeeConnectionListener extends AbstractConnectionListener impleme
e.setCancelReason(TextComponent.fromLegacyText(Message.LOADING_DATABASE_ERROR.asString(this.plugin.getLocaleManager())));
e.setCancelled(true);
}
this.plugin.getEventFactory().handlePlayerLoginProcess(c.getUniqueId(), c.getName(), null);
}
// finally, complete our intent to modify state, so the proxy can continue handling the connection.