1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-16 18:31:53 +01:00

Don't clone location in PreCreatureSpawnEvent ()

This commit is contained in:
alex6777 2023-01-16 10:03:58 -05:00
parent 4537ed779a
commit 1b552c2a22

View file

@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private boolean shouldAbortSpawn;
+
+ public PreCreatureSpawnEvent(@NotNull Location location, @NotNull EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason) {
+ this.location = Preconditions.checkNotNull(location, "Location may not be null").clone();
+ this.location = Preconditions.checkNotNull(location, "Location may not be null");
+ this.type = Preconditions.checkNotNull(type, "Type may not be null");
+ this.reason = Preconditions.checkNotNull(reason, "Reason may not be null");
+ }