Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.spongepowered.configurate.serialize.SerializationException;

import java.io.File;
import java.math.BigDecimal;
Expand Down Expand Up @@ -83,7 +82,7 @@ public final void reloadConfig() {
config.load();
try {
holder = config.getRootNode().get(UserConfigHolder.class);
} catch (SerializationException e) {
} catch (Throwable e) {
Comment thread
mdcfe marked this conversation as resolved.
ess.getLogger().log(Level.SEVERE, "Error while reading user config: " + config.getFile().getName(), e);
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public Material deserialize(Type type, Object obj) throws SerializationException
if (obj instanceof String) {
return Material.matchMaterial((String) obj);
}
return null;

// Configurate will use an EnumSet to deserialize, which doesn't support null types. Default to air.
return Material.AIR;
}

@Override
Expand Down