mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-04-06 13:30:43 +08:00
Fix invalid unlimited items preventing userdata to load
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.
This commit is contained in:
parent
f84a311c2b
commit
f26e1b2e29
@ -17,7 +17,9 @@ public class MaterialTypeSerializer extends ScalarSerializer<Material> {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user