Fixed issue on empty properties
This commit is contained in:
parent
d9486acbd2
commit
10a1166592
1 changed files with 5 additions and 3 deletions
|
@ -41,9 +41,11 @@ public class YamlStorage implements NpcStorage {
|
|||
deserializeLocation(config.getConfigurationSection("location")));
|
||||
|
||||
ConfigurationSection properties = config.getConfigurationSection("properties");
|
||||
for (String key : properties.getKeys(false)) {
|
||||
EntityPropertyImpl<?> property = EntityPropertyImpl.getByName(key);
|
||||
npc.UNSAFE_setProperty(property, property.deserialize(properties.getString(key)));
|
||||
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")) {
|
||||
|
|
Loading…
Reference in a new issue