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:
+2
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user