Merge pull request #48 from D3v1s0m/2.0.0

Fixed issue on empty properties
This commit is contained in:
Pyr 2023-05-11 07:29:08 +01:00 committed by GitHub
commit 49f57547c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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));