mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
75 lines
2.3 KiB
Diff
75 lines
2.3 KiB
Diff
From 36b136881620915be2a5eb039c3a9b8c1dc0861b Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 50c6f76..b90b9c3 100644
|
|
--- a/src/main/java/org/bukkit/scoreboard/Team.java
|
|
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
|
|
@@ -118,6 +118,15 @@ public interface Team {
|
|
*/
|
|
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
|
|
*
|
|
@@ -145,6 +154,15 @@ public interface Team {
|
|
*/
|
|
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.
|
|
*
|
|
@@ -155,6 +173,15 @@ public interface Team {
|
|
*/
|
|
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
|
|
*
|
|
@@ -171,4 +198,13 @@ public interface Team {
|
|
* @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
|
|
}
|
|
--
|
|
2.1.0
|
|
|