2021-05-09 08:33:34 +02:00
--- a/net/minecraft/server/commands/CommandSummon.java
+++ b/net/minecraft/server/commands/CommandSummon.java
2021-06-11 07:00:00 +02:00
@@ -66,7 +66,7 @@
2021-05-09 08:33:34 +02:00
((EntityInsentient) entity).prepare(commandlistenerwrapper.getWorld(), commandlistenerwrapper.getWorld().getDamageScaler(entity.getChunkCoordinates()), EnumMobSpawn.COMMAND, (GroupDataEntity) null, (NBTTagCompound) null);
}
- if (!worldserver.addAllEntitiesSafely(entity)) {
+ if (!worldserver.addAllEntitiesSafely(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"
2021-06-11 07:00:00 +02:00
throw CommandSummon.ERROR_DUPLICATE_UUID.create();
2021-05-09 08:33:34 +02:00
} else {
commandlistenerwrapper.sendMessage(new ChatMessage("commands.summon.success", new Object[]{entity.getScoreboardDisplayName()}), true);