Skip to content

Commit

Permalink
Fixed cloning of LazyWorldLocation returns a regular Location instead…
Browse files Browse the repository at this point in the history
… of a LazyWorldLocation (#1227)
  • Loading branch information
OmerBenGera committed Jul 24, 2022
1 parent 4829acd commit e756657
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -24,6 +24,12 @@ public World getWorld() {
return super.getWorld();
}

@Override
public Location clone() {
return getWorld() == null ? new LazyWorldLocation(this.worldName, getX(), getY(), getZ(), getPitch(), getYaw()) :
super.clone();
}

public String getWorldName() {
return worldName;
}
Expand Down

0 comments on commit e756657

Please sign in to comment.