mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
23 lines
No EOL
1 KiB
Diff
23 lines
No EOL
1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Thu, 17 Apr 2014 19:35:53 +1000
|
|
Subject: [PATCH] Add Score.isScoreSet()Z API.
|
|
|
|
Also fix generics on CraftScore.getScore()I.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
|
@@ -0,0 +0,0 @@ final class CraftScore implements Score {
|
|
// Spigot start
|
|
@Override
|
|
public boolean isScoreSet() throws IllegalStateException {
|
|
- throw new UnsupportedOperationException("Not supported yet.");
|
|
+ Scoreboard board = objective.checkState().board;
|
|
+
|
|
+ return board.getPlayers().contains(entry) && board.getPlayerObjectives(entry).containsKey(objective.getHandle());
|
|
}
|
|
// Spigot end
|
|
}
|
|
--
|