geforkt von Mirrors/Paper
Add ability to add a string to a scoreboard instead of a player
By: Matt <mattbdev@outlook.com>
Dieser Commit ist enthalten in:
Ursprung
cca150746b
Commit
f9402cfa7e
@ -103,9 +103,21 @@ public interface Scoreboard {
|
||||
* @param player the player to search for
|
||||
* @return the player's Team or null if the player is not on a team
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @deprecated Scoreboards can contain entries that aren't players
|
||||
* @see #getEntryTeam(String)
|
||||
*/
|
||||
@Deprecated
|
||||
Team getPlayerTeam(OfflinePlayer player) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Gets a entries Team on this Scoreboard
|
||||
*
|
||||
* @param entry the entry to search for
|
||||
* @return the entries Team or null if the entry is not on a team
|
||||
* @throws IllegalArgumentException if entry is null
|
||||
*/
|
||||
Team getEntryTeam(String entry) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Gets a Team by name on this Scoreboard
|
||||
*
|
||||
|
@ -21,7 +21,7 @@ public interface Team {
|
||||
String getName() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Gets the name displayed to players for this team
|
||||
* Gets the name displayed to entries for this team
|
||||
*
|
||||
* @return Team display name
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
@ -29,7 +29,7 @@ public interface Team {
|
||||
String getDisplayName() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Sets the name displayed to players for this team
|
||||
* Sets the name displayed to entries for this team
|
||||
*
|
||||
* @param displayName New display name
|
||||
* @throws IllegalArgumentException if displayName is longer than 32
|
||||
@ -39,7 +39,7 @@ public interface Team {
|
||||
void setDisplayName(String displayName) throws IllegalStateException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Gets the prefix prepended to the display of players on this team.
|
||||
* Gets the prefix prepended to the display of entries on this team.
|
||||
*
|
||||
* @return Team prefix
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
@ -47,7 +47,7 @@ public interface Team {
|
||||
String getPrefix() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Sets the prefix prepended to the display of players on this team.
|
||||
* Sets the prefix prepended to the display of entries on this team.
|
||||
*
|
||||
* @param prefix New prefix
|
||||
* @throws IllegalArgumentException if prefix is null
|
||||
@ -58,7 +58,7 @@ public interface Team {
|
||||
void setPrefix(String prefix) throws IllegalStateException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Gets the suffix appended to the display of players on this team.
|
||||
* Gets the suffix appended to the display of entries on this team.
|
||||
*
|
||||
* @return the team's current suffix
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
@ -66,7 +66,7 @@ public interface Team {
|
||||
String getSuffix() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Sets the suffix appended to the display of players on this team.
|
||||
* Sets the suffix appended to the display of entries on this team.
|
||||
*
|
||||
* @param suffix the new suffix for this team.
|
||||
* @throws IllegalArgumentException if suffix is null
|
||||
@ -130,14 +130,25 @@ public interface Team {
|
||||
* Gets the Set of players on the team
|
||||
*
|
||||
* @return players on the team
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
* @throws IllegalStateException if this team has been unregistered\
|
||||
* @deprecated Teams can contain entries that aren't players
|
||||
* @see #getEntries()
|
||||
*/
|
||||
@Deprecated
|
||||
Set<OfflinePlayer> getPlayers() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Gets the Set of entries on the team
|
||||
*
|
||||
* @return entries on the team
|
||||
* @throws IllegalStateException if this entries has been unregistered\
|
||||
*/
|
||||
Set<String> getEntries() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Gets the size of the team
|
||||
*
|
||||
* @return number of players on the team
|
||||
* @return number of entries on the team
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
int getSize() throws IllegalStateException;
|
||||
@ -158,9 +169,23 @@ public interface Team {
|
||||
* @param player the player to add
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
* @deprecated Teams can contain entries that aren't players
|
||||
* @see #addEntry(String)
|
||||
*/
|
||||
@Deprecated
|
||||
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.
|
||||
*
|
||||
@ -168,9 +193,22 @@ public interface Team {
|
||||
* @return if the player was on this team
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
* @deprecated Teams can contain entries that aren't players
|
||||
* @see #removeEntry(String)
|
||||
*/
|
||||
@Deprecated
|
||||
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
|
||||
*
|
||||
@ -185,6 +223,18 @@ public interface Team {
|
||||
* @return true if the player is a member of this team
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
* @deprecated Teams can contain entries that aren't players
|
||||
* @see #hasEntry(String)
|
||||
*/
|
||||
@Deprecated
|
||||
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;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren