mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
30e4583dbe
By: Initial Source <noreply+automated@papermc.io>
11 lines
737 B
Diff
11 lines
737 B
Diff
--- a/net/minecraft/server/commands/SummonCommand.java
|
|
+++ b/net/minecraft/server/commands/SummonCommand.java
|
|
@@ -67,7 +67,7 @@
|
|
((Mob) entity).finalizeSpawn(source.getLevel(), source.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.COMMAND, (SpawnGroupData) null);
|
|
}
|
|
|
|
- if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
|
|
+ if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"
|
|
throw SummonCommand.ERROR_DUPLICATE_UUID.create();
|
|
} else {
|
|
return entity;
|