2015-04-09 05:41:04 +02:00
|
|
|
From e061d5d5ddbe2ab2579f421f3c11edd5f10dcd95 Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02:00
|
|
|
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
|
2015-01-17 00:12:14 +01:00
|
|
|
index 0b71b53..ee9d2ae 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
|
2015-01-17 00:12:14 +01:00
|
|
|
@@ -63,7 +63,9 @@ final class CraftScore implements Score {
|
2014-11-28 02:17:45 +01:00
|
|
|
// Spigot start
|
2015-01-17 00:12:14 +01:00
|
|
|
@Override
|
2014-11-28 02:17:45 +01:00
|
|
|
public boolean isScoreSet() throws IllegalStateException {
|
|
|
|
- throw new UnsupportedOperationException("Not supported yet.");
|
2014-07-21 22:46:54 +02:00
|
|
|
+ Scoreboard board = objective.checkState().board;
|
|
|
|
+
|
|
|
|
+ return board.getPlayers().contains(entry) && board.getPlayerObjectives(entry).containsKey(objective.getHandle());
|
|
|
|
}
|
2014-11-28 02:17:45 +01:00
|
|
|
// Spigot end
|
|
|
|
}
|
2014-07-21 22:46:54 +02:00
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|