Fix NPE in UserData#getLogoutLocation (#4341)

This commit is contained in:
triagonal 2021-07-10 23:17:26 +10:00 committed by GitHub
parent 0b6b0f9c61
commit 48532a0ae6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -277,7 +277,8 @@ public abstract class UserData extends PlayerExtension implements IConf {
}
public Location getLogoutLocation() {
return holder.logoutLocation().location();
final LazyLocation logoutLocation = holder.logoutLocation();
return logoutLocation != null ? logoutLocation.location() : null;
}
public void setLogoutLocation(final Location loc) {