13
0
geforkt von Mirrors/Paper

Fix CraftCriteria defaults map

Dieser Commit ist enthalten in:
Jake Potrebic 2021-10-04 22:31:51 -07:00
Ursprung 552c78a7a0
Commit 5f4779fc86

Datei anzeigen

@ -54,7 +54,7 @@ public final class CraftCriteria implements Criteria {
}
static CraftCriteria getFromNMS(Objective objective) {
return CraftCriteria.DEFAULTS.get(objective.getCriteria().getName());
return java.util.Objects.requireNonNullElseGet(CraftCriteria.DEFAULTS.get(objective.getCriteria().getName()), () -> new CraftCriteria(objective.getCriteria())); // Paper
}
public static CraftCriteria getFromBukkit(String name) {