mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Fix NPE in AdvancementProgress#getDateAwarded
This commit is contained in:
parent
fa87f62891
commit
cfe07dca76
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ public class CraftAdvancementProgress implements AdvancementProgress {
|
|||
@Override
|
||||
public Date getDateAwarded(String criteria) {
|
||||
CriterionProgress criterion = this.handle.getCriterion(criteria);
|
||||
return (criterion == null) ? null : Date.from(criterion.getObtained());
|
||||
return (criterion == null) ? null : criterion.getObtained() == null ? null : Date.from(criterion.getObtained()); // Paper - fix NPE if criterion isn't obtained
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue