13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/net/minecraft/server/commands/CommandSummon.patch

12 Zeilen
913 B
Diff

--- a/net/minecraft/server/commands/CommandSummon.java
+++ b/net/minecraft/server/commands/CommandSummon.java
@@ -65,7 +65,7 @@
((EntityInsentient) entity).finalizeSpawn(commandlistenerwrapper.getLevel(), commandlistenerwrapper.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EnumMobSpawn.COMMAND, (GroupDataEntity) null, (NBTTagCompound) 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 {
commandlistenerwrapper.sendSuccess(IChatBaseComponent.translatable("commands.summon.success", entity.getDisplayName()), true);