13
0
geforkt von Mirrors/Paper

SPIGOT-438: Correct CraftScoreboard.getObjective NPEing instead of returning null for missing objectives

Dieser Commit ist enthalten in:
Thinkofdeath 2015-01-17 23:10:08 +00:00
Ursprung 00eba538b0
Commit 59dd2ddb9d

Datei anzeigen

@ -37,7 +37,8 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
public Objective getObjective(String name) throws IllegalArgumentException {
Validate.notNull(name, "Name cannot be null");
return new CraftObjective(this, board.getObjective(name));
ScoreboardObjective nms = board.getObjective(name);
return nms == null ? null : new CraftObjective(this, nms);
}
public ImmutableSet<Objective> getObjectivesByCriteria(String criteria) throws IllegalArgumentException {