Fix a bunch more issues arising from mutable types (#11769)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user