Skip to content

Commit

Permalink
Fix invalid unlimited items preventing userdata to load
Browse files Browse the repository at this point in the history
Invalid material names would previously return a null value
when deserializing. This raises an exception from within
Configurate because they use an EnumSet internally during
deserialization which doesn't support null elements.
  • Loading branch information
JRoy authored and mdcfe committed Jul 22, 2023
1 parent f84a311 commit f26e1b2
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit f26e1b2

Please sign in to comment.