mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
b3a8254758
By: md_5 <git@md-5.net>
11 lines
892 B
Diff
11 lines
892 B
Diff
--- a/net/minecraft/server/commands/CommandSummon.java
|
|
+++ b/net/minecraft/server/commands/CommandSummon.java
|
|
@@ -66,7 +66,7 @@
|
|
((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"
|
|
throw CommandSummon.ERROR_DUPLICATE_UUID.create();
|
|
} else {
|
|
commandlistenerwrapper.sendMessage(new ChatMessage("commands.summon.success", new Object[]{entity.getScoreboardDisplayName()}), true);
|