mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-28 02:43:52 -07:00
Add Score.isScoreSet()Z API.
Also fix generics on CraftScore.getScore()I. By: md_5 <git@md-5.net>
This commit is contained in:
31
Bukkit-Patches/0027-Add-Score.isScoreSet-Z-API.patch
Normal file
31
Bukkit-Patches/0027-Add-Score.isScoreSet-Z-API.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 42fb4c3837a133f6bbfd221dbe690c5a59e3c561 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Thu, 17 Apr 2014 19:35:13 +1000
|
||||
Subject: [PATCH] Add Score.isScoreSet()Z API.
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Score.java b/src/main/java/org/bukkit/scoreboard/Score.java
|
||||
index 4c10346..2410cbd 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Score.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Score.java
|
||||
@@ -51,6 +51,17 @@ public interface Score {
|
||||
*/
|
||||
void setScore(int score) throws IllegalStateException;
|
||||
|
||||
+ // Spigot start
|
||||
+ /**
|
||||
+ * Shows if this score has been set at any point in time.
|
||||
+ *
|
||||
+ * @return if this score has been set before
|
||||
+ * @throws IllegalStateException if the associated objective has been
|
||||
+ * unregistered
|
||||
+ */
|
||||
+ boolean isScoreSet() throws IllegalStateException;
|
||||
+ // Spigot end
|
||||
+
|
||||
/**
|
||||
* Gets the scoreboard for the associated objective.
|
||||
*
|
||||
--
|
||||
1.8.3.2
|
||||
|
Reference in New Issue
Block a user