Skip to content

Commit 2a60ae5

Browse files
committed
ExprLocationOf - clone new locations
1 parent 7d130ed commit 2a60ae5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/github/skriptdev/skript/plugin/elements/expressions/other/ExprLocationOf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static void register(SkriptRegistration registration) {
2929
World world = entity.getWorld();
3030
assert world != null;
3131
TransformComponent transform = entity.getTransformComponent();
32-
return new Location(world.getName(), transform.getPosition(), transform.getRotation());
32+
return new Location(world.getName(), transform.getPosition().clone(), transform.getRotation().clone());
3333
} else if (owner instanceof Block block) {
3434
return block.getLocation();
3535
}

0 commit comments

Comments
 (0)