change first login event handling

This commit is contained in:
Luck 2016-12-30 12:46:04 +00:00
parent 2ce5679373
commit a54046907d
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 4 additions and 4 deletions

View File

@ -108,8 +108,8 @@ public class BungeeListener extends AbstractListener implements Listener {
plugin.getStorage().force().saveUUIDData(c.getName(), c.getUniqueId()).join();
}
} else {
UUID uuid = plugin.getStorage().getUUID(c.getName()).join();
if (uuid == null) {
String name = plugin.getStorage().getName(c.getUniqueId()).join();
if (name == null) {
plugin.getApiProvider().fireEventAsync(new UserFirstLoginEvent(c.getUniqueId(), c.getName()));
}

View File

@ -54,8 +54,8 @@ public class AbstractListener {
plugin.getStorage().force().saveUUIDData(username, u);
}
} else {
UUID uuid = plugin.getStorage().force().getUUID(username).join();
if (uuid == null) {
String name = plugin.getStorage().force().getName(u).join();
if (name == null) {
plugin.getApiProvider().fireEventAsync(new UserFirstLoginEvent(u, username));
}