3
0
KCauldronX/patches/org/bukkit/scoreboard/Team.java.patch
2017-06-28 08:27:25 +08:00

53 lines
2.0 KiB
Diff

--- ../src-base/minecraft/org/bukkit/scoreboard/Team.java
+++ ../src-work/minecraft/org/bukkit/scoreboard/Team.java
@@ -146,6 +146,17 @@
void addPlayer(OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
/**
+ * This puts the specified entry onto this team for the scoreboard.
+ * <p>
+ * This will remove the entry from any other team on the scoreboard.
+ *
+ * @param entry the entry to add
+ * @throws IllegalArgumentException if entry is null
+ * @throws IllegalStateException if this team has been unregistered
+ */
+ void addEntry(String entry) throws IllegalStateException, IllegalArgumentException;
+
+ /**
* Removes the player from this team.
*
* @param player the player to remove
@@ -156,6 +167,16 @@
boolean removePlayer(OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
/**
+ * Removes the entry from this team.
+ *
+ * @param entry the entry to remove
+ * @throws IllegalArgumentException if entry is null
+ * @throws IllegalStateException if this team has been unregistered
+ * @return if the entry was a part of this team
+ */
+ boolean removeEntry(String entry) throws IllegalStateException, IllegalArgumentException;
+
+ /**
* Unregisters this team from the Scoreboard
*
* @throws IllegalStateException if this team has been unregistered
@@ -171,4 +192,14 @@
* @throws IllegalStateException if this team has been unregistered
*/
boolean hasPlayer(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException;
+
+ /**
+ * Checks to see if the specified entry is a member of this team.
+ *
+ * @param entry the entry to search for
+ * @return true if the entry is a member of this team
+ * @throws IllegalArgumentException if entry is null
+ * @throws IllegalStateException if this team has been unregistered
+ */
+ boolean hasEntry(String entry) throws IllegalArgumentException, IllegalStateException;
}