blob: ecd57e2c6e90cb7f9eeb4995f94c2b35635ba346 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
--- a/net/minecraft/server/commands/SummonCommand.java
+++ b/net/minecraft/server/commands/SummonCommand.java
@@ -68,7 +67,7 @@
((Mob) entity).finalizeSpawn(commandsourcestack.getLevel(), commandsourcestack.getLevel().getCurrentDifficultyAt(entity.blockPosition()), MobSpawnType.COMMAND, (SpawnGroupData) null, (CompoundTag) null);
}
- if (!serverlevel.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;
|