From dd029786ddcccbe4e62b963fb4083d4c4d4fab7d Mon Sep 17 00:00:00 2001 From: D3v1s0m Date: Thu, 31 Aug 2023 09:23:50 +0530 Subject: [PATCH] fixed placeholder not working in name property --- .../java/lol/pyr/znpcsplus/entity/properties/NameProperty.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/entity/properties/NameProperty.java b/plugin/src/main/java/lol/pyr/znpcsplus/entity/properties/NameProperty.java index ec57fcd..e3b7230 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/entity/properties/NameProperty.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/entity/properties/NameProperty.java @@ -5,6 +5,7 @@ import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes; import com.github.retrooper.packetevents.util.adventure.AdventureSerializer; import lol.pyr.znpcsplus.entity.EntityPropertyImpl; import lol.pyr.znpcsplus.entity.PacketEntity; +import lol.pyr.znpcsplus.util.PapiUtil; import net.kyori.adventure.text.Component; import org.bukkit.entity.Player; @@ -29,6 +30,7 @@ public class NameProperty extends EntityPropertyImpl { String serialized = legacy ? AdventureSerializer.getLegacyGsonSerializer().serialize(value) : AdventureSerializer.getGsonSerializer().serialize(value); + serialized = PapiUtil.set(player, serialized); if (optional) properties.put(2, newEntityData(2, EntityDataTypes.OPTIONAL_COMPONENT, Optional.of(serialized))); else properties.put(2, newEntityData(2, EntityDataTypes.STRING, serialized)); }