temp fix for null values in setting property

This commit is contained in:
D3v1s0m 2023-05-21 08:53:26 +05:30
parent 14ff80b3ef
commit 8129405de8
No known key found for this signature in database
GPG Key ID: 3B6EC35367B8D82E

@ -113,6 +113,7 @@ public class NpcImpl extends Viewable implements Npc {
} }
public <T> void setProperty(EntityPropertyImpl<T> key, T value) { public <T> void setProperty(EntityPropertyImpl<T> key, T value) {
if (value == null) return;
if (value.equals(key.getDefaultValue())) removeProperty(key); if (value.equals(key.getDefaultValue())) removeProperty(key);
else propertyMap.put(key, value); else propertyMap.put(key, value);
_refreshMeta(); _refreshMeta();