geforkt von Mirrors/Paper
SPIGOT-7562: Fix Score#getScore and Score#isScoreSet
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
5e82782283
Commit
71ca5a7bdf
@ -42,12 +42,10 @@ final class CraftScore implements Score {
|
||||
public int getScore() {
|
||||
Scoreboard board = objective.checkState().board;
|
||||
|
||||
if (board.getTrackedPlayers().contains(entry)) { // Lazy
|
||||
ReadOnlyScoreInfo score = board.getPlayerScoreInfo(entry, objective.getHandle());
|
||||
if (score != null) { // Lazy
|
||||
return score.value();
|
||||
}
|
||||
}
|
||||
|
||||
return 0; // Lazy
|
||||
}
|
||||
@ -61,7 +59,7 @@ final class CraftScore implements Score {
|
||||
public boolean isScoreSet() {
|
||||
Scoreboard board = objective.checkState().board;
|
||||
|
||||
return board.getTrackedPlayers().contains(entry) && board.getPlayerScoreInfo(entry, objective.getHandle()) != null;
|
||||
return board.getPlayerScoreInfo(entry, objective.getHandle()) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren