ignore refreshing non allowed properties

This commit is contained in:
D3v1s0m 2024-06-03 13:39:47 +05:30
parent c50e2fd0d4
commit d75f260935
No known key found for this signature in database
GPG Key ID: FA1F770C7B1D40C1

@ -136,6 +136,7 @@ public class NpcImpl extends Viewable implements Npc {
}
private <T> void UNSAFE_refreshProperty(EntityPropertyImpl<T> property) {
if (!type.isAllowedProperty(property)) return;
for (Player viewer : getViewers()) {
List<EntityData> data = property.applyStandalone(viewer, entity, true);
if (!data.isEmpty()) packetFactory.sendMetadata(viewer, entity, data);