2015-04-09 05:18:56 +02:00
|
|
|
From 85465654d747efea2e5a03f63d81d9276c8313d0 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:22:26 +1000
|
|
|
|
Subject: [PATCH] Expand team API to allow arbitrary strings.
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
|
2014-12-19 00:33:08 +01:00
|
|
|
index e6d1442..2bd78e3 100644
|
2014-07-21 22:46:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/scoreboard/Team.java
|
|
|
|
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
|
2014-12-19 00:33:08 +01:00
|
|
|
@@ -134,6 +134,15 @@ public interface Team {
|
2014-07-21 22:46:54 +02:00
|
|
|
*/
|
|
|
|
Set<OfflinePlayer> getPlayers() throws IllegalStateException;
|
|
|
|
|
|
|
|
+ // Spigot start
|
|
|
|
+ /**
|
|
|
|
+ * Same as the player method, but with an arbitrary string.
|
|
|
|
+ *
|
|
|
|
+ * @see #getPlayers()
|
|
|
|
+ */
|
|
|
|
+ Set<String> getEntries() throws IllegalStateException;
|
|
|
|
+ // Spigot End
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Gets the size of the team
|
|
|
|
*
|
2014-12-19 00:33:08 +01:00
|
|
|
@@ -161,6 +170,15 @@ public interface Team {
|
2014-07-21 22:46:54 +02:00
|
|
|
*/
|
|
|
|
void addPlayer(OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
|
|
|
|
|
|
|
|
+ // Spigot start
|
|
|
|
+ /**
|
|
|
|
+ * Same as the player method, but with an arbitrary string.
|
|
|
|
+ *
|
|
|
|
+ * @see #addPlayer(org.bukkit.OfflinePlayer)
|
|
|
|
+ */
|
|
|
|
+ void addEntry(String entry) throws IllegalStateException, IllegalArgumentException;
|
|
|
|
+ // Spigot end
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Removes the player from this team.
|
|
|
|
*
|
2014-12-19 00:33:08 +01:00
|
|
|
@@ -171,6 +189,15 @@ public interface Team {
|
2014-07-21 22:46:54 +02:00
|
|
|
*/
|
|
|
|
boolean removePlayer(OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
|
|
|
|
|
|
|
|
+ // Spigot start
|
|
|
|
+ /**
|
|
|
|
+ * Same as the player method, but with an arbitrary string.
|
|
|
|
+ *
|
|
|
|
+ * @see #removePlayer(org.bukkit.OfflinePlayer)
|
|
|
|
+ */
|
|
|
|
+ boolean removeEntry(String entry) throws IllegalStateException, IllegalArgumentException;
|
|
|
|
+ // Spigot end
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Unregisters this team from the Scoreboard
|
|
|
|
*
|
2014-12-19 00:33:08 +01:00
|
|
|
@@ -187,4 +214,13 @@ public interface Team {
|
2014-07-21 22:46:54 +02:00
|
|
|
* @throws IllegalStateException if this team has been unregistered
|
|
|
|
*/
|
|
|
|
boolean hasPlayer(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException;
|
|
|
|
+
|
|
|
|
+ // Spigot start
|
|
|
|
+ /**
|
|
|
|
+ * Same as the player method, but with an arbitrary string.
|
|
|
|
+ *
|
|
|
|
+ * @see #hasPlayer(org.bukkit.OfflinePlayer)
|
|
|
|
+ */
|
|
|
|
+ boolean hasEntry(String entry) throws IllegalArgumentException,IllegalStateException;
|
|
|
|
+ // Spigot end
|
|
|
|
}
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|