Fixed bug related to fetching player health when he is offline.

This commit is contained in:
Ka0rX 2023-04-02 23:23:11 +01:00
parent c31a3fcec1
commit d7db3f6d68

View File

@ -950,7 +950,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
@Override @Override
public double getHealth() { public double getHealth() {
return getPlayer() == null ? health : getPlayer().getHealth(); return isOnline() ? getPlayer().getHealth():health ;
} }
@Override @Override