3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

Don't clone location in PreCreatureSpawnEvent (#8790)

Dieser Commit ist enthalten in:
alex6777 2023-01-16 10:03:58 -05:00 committet von GitHub
Ursprung ec9dba85db
Commit 567ff90111
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..3ad231aa3206c8cfd5ec995249584ceb
+ 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");
+ }