use of org.lanternpowered.server.world.LanternWorldProperties in project LanternServer by LanternPowered.
the class UserStore method deserialize.
@Override
public void deserialize(T player, DataView dataView) {
super.deserialize(player, dataView);
final int dimension = dataView.getInt(DIMENSION).orElse(0);
Lantern.getWorldManager().getWorldProperties(dimension).ifPresent(worldProperties -> {
final LanternWorldProperties worldProperties0 = (LanternWorldProperties) worldProperties;
final Optional<LanternWorld> optWorld = worldProperties0.getWorld();
if (optWorld.isPresent()) {
player.setRawWorld(optWorld.get());
} else {
player.setUserWorld(worldProperties0);
}
});
}
Aggregations