Fixed issue on empty properties

This commit is contained in:
D3v1s0m 2023-05-11 11:54:28 +05:30
parent d9486acbd2
commit 10a1166592
No known key found for this signature in database
GPG Key ID: 03DB5500EBB22A36

@ -41,10 +41,12 @@ public class YamlStorage implements NpcStorage {
deserializeLocation(config.getConfigurationSection("location")));
ConfigurationSection properties = config.getConfigurationSection("properties");
if (properties != null) {
for (String key : properties.getKeys(false)) {
EntityPropertyImpl<?> property = EntityPropertyImpl.getByName(key);
npc.UNSAFE_setProperty(property, property.deserialize(properties.getString(key)));
}
}
for (String line : config.getStringList("hologram")) {
npc.getHologram().addLine(MiniMessage.miniMessage().deserialize(line));