mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
11 lines
778 B
Diff
11 lines
778 B
Diff
--- a/net/minecraft/server/commands/CommandSummon.java
|
|
+++ b/net/minecraft/server/commands/CommandSummon.java
|
|
@@ -67,7 +67,7 @@
|
|
((EntityInsentient) entity).finalizeSpawn(commandlistenerwrapper.getLevel(), commandlistenerwrapper.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EnumMobSpawn.COMMAND, (GroupDataEntity) null);
|
|
}
|
|
|
|
- if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
|
|
+ if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"
|
|
throw CommandSummon.ERROR_DUPLICATE_UUID.create();
|
|
} else {
|
|
return entity;
|