mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-30 19:52:06 -07:00
Clone mutable types in events when changes are discarded (#10333)
This commit is contained in:
@@ -208,7 +208,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public Location getLocation() {
|
||||
+ return this.location;
|
||||
+ return this.location != null ? this.location.clone() : null;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -570,7 +570,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.Nullable
|
||||
+ public org.bukkit.Location getLocation() {
|
||||
+ return loc;
|
||||
+ return this.loc != null ? this.loc.clone() : null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
Reference in New Issue
Block a user