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 committed 2019-01-02 13:54:55 +00:00
1 parent a0d04790a5
commit 6fc2321fad
7 files changed
+49 -23

No files matched your search

@@ -79,8 +79,8 @@ public class SpongeConnectionListener extends AbstractConnectionListener {
- setting up cached data. */
try {
User user = loadUser(profile.getUniqueId(), username);
this.plugin.getEventFactory().handleUserLoginProcess(profile.getUniqueId(), username, user);
recordConnection(profile.getUniqueId());
this.plugin.getEventFactory().handlePlayerLoginProcess(profile.getUniqueId(), username, user);
} catch (Exception ex) {
this.plugin.getLogger().severe("Exception occurred whilst loading data for " + profile.getUniqueId() + " - " + profile.getName());
ex.printStackTrace();
@@ -91,6 +91,7 @@ public class SpongeConnectionListener extends AbstractConnectionListener {
e.setMessageCancelled(false);
//noinspection deprecation
e.setMessage(TextSerializers.LEGACY_FORMATTING_CODE.deserialize(Message.LOADING_DATABASE_ERROR.asString(this.plugin.getLocaleManager())));
this.plugin.getEventFactory().handlePlayerLoginProcess(profile.getUniqueId(), username, null);
}
}