Fix a bunch more issues arising from mutable types (#11769)

This commit is contained in:
Jake Potrebic
2024-12-22 13:50:00 -08:00
committed by GitHub
parent 8ad15d64f0
commit 083c083188
19 changed files with 39 additions and 39 deletions

View File

@@ -53,7 +53,7 @@ public class EntityMoveEvent extends EntityEvent implements Cancellable {
*/
public void setFrom(final Location from) {
this.validateLocation(from);
this.from = from;
this.from = from.clone();
}
/**
@@ -72,7 +72,7 @@ public class EntityMoveEvent extends EntityEvent implements Cancellable {
*/
public void setTo(final Location to) {
this.validateLocation(to);
this.to = to;
this.to = to.clone();
}
/**

View File

@@ -52,7 +52,7 @@ public class WorldBorderCenterChangeEvent extends WorldBorderEvent implements Ca
* @param newCenter the new center
*/
public void setNewCenter(final Location newCenter) {
this.newCenter = newCenter;
this.newCenter = newCenter.clone();
}
@Override