Fix null check in Username->UUID ignore list converter (#3225)

Didn't test with a username that didn't exist and didn't notice this. Null check(s) are now in their proper place.

Fixes #3223.
This commit is contained in:
Josh Roy 2020-05-04 08:48:50 -04:00 committed by GitHub
parent e9d29f789f
commit dd5fe117b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -65,9 +65,9 @@ public class EssentialsUpgrade {
if (name == null) {
continue;
}
OfflinePlayer user = ((OfflinePlayer) ess.getOfflineUser(name).getBase());
if (user != null) {
migratedIgnores.add(user.getUniqueId().toString());
User user = ess.getOfflineUser(name);
if (user != null && user.getBase() != null) {
migratedIgnores.add(user.getBase().getUniqueId().toString());
}
}
config.removeProperty("ignore");