From 21638ddebc7b99ba15ab68f256688176fd67763e Mon Sep 17 00:00:00 2001 From: Pyrbu Date: Thu, 11 May 2023 05:49:29 +0100 Subject: [PATCH] fix null uuids breaking npc spawning (fixes #47) --- src/main/java/io/github/znetworkw/znpcservers/npc/NPC.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/znetworkw/znpcservers/npc/NPC.java b/src/main/java/io/github/znetworkw/znpcservers/npc/NPC.java index 44ca8966..f57b5056 100644 --- a/src/main/java/io/github/znetworkw/znpcservers/npc/NPC.java +++ b/src/main/java/io/github/znetworkw/znpcservers/npc/NPC.java @@ -239,7 +239,7 @@ public synchronized void spawn(ZUser user) { ServerVersion version = PacketEvents.getAPI().getServerManager().getVersion(); EntityType type = SpigotConversionUtil.fromBukkitEntityType(((Entity) bukkitEntity).getType()); if (version.isNewerThanOrEquals(ServerVersion.V_1_14)) PacketEvents.getAPI().getPlayerManager().sendPacket( - player, new WrapperPlayServerSpawnEntity(entityID, Optional.of(uuid), type, location.toVector3d(), + player, new WrapperPlayServerSpawnEntity(entityID, Optional.ofNullable(uuid), type, location.toVector3d(), location.getPitch(), location.getYaw(), location.getYaw(), 0, Optional.empty())); else PacketEvents.getAPI().getPlayerManager().sendPacket(player, new WrapperPlayServerSpawnLivingEntity( entityID, uuid, type, location.toVector3d(), location.getYaw(), location.getPitch(),