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,9 +41,11 @@ public class YamlStorage implements NpcStorage {
deserializeLocation(config.getConfigurationSection("location"))); deserializeLocation(config.getConfigurationSection("location")));
ConfigurationSection properties = config.getConfigurationSection("properties"); ConfigurationSection properties = config.getConfigurationSection("properties");
for (String key : properties.getKeys(false)) { if (properties != null) {
EntityPropertyImpl<?> property = EntityPropertyImpl.getByName(key); for (String key : properties.getKeys(false)) {
npc.UNSAFE_setProperty(property, property.deserialize(properties.getString(key))); EntityPropertyImpl<?> property = EntityPropertyImpl.getByName(key);
npc.UNSAFE_setProperty(property, property.deserialize(properties.getString(key)));
}
} }
for (String line : config.getStringList("hologram")) { for (String line : config.getStringList("hologram")) {