Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions paper-api/src/main/java/org/bukkit/scoreboard/Team.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ public interface Team extends net.kyori.adventure.audience.ForwardingAudience {
*
* @param player the player to add
* @throws IllegalStateException if this team has been unregistered
* @throws IllegalArgumentException if {@link OfflinePlayer#getName()} is null
* @see #addEntry(String)
*/
// @Deprecated(since = "1.8.6") // Paper
void addPlayer(@NotNull OfflinePlayer player);

/**
Expand Down Expand Up @@ -369,9 +369,9 @@ default void addEntries(@NotNull String... entries) throws IllegalStateException
* @param player the player to remove
* @return if the player was on this team
* @throws IllegalStateException if this team has been unregistered
* @throws IllegalArgumentException if {@link OfflinePlayer#getName()} is null
* @see #removeEntry(String)
*/
// @Deprecated(since = "1.8.6") // Paper
boolean removePlayer(@NotNull OfflinePlayer player);

/**
Expand Down Expand Up @@ -446,9 +446,9 @@ default boolean removeEntries(@NotNull String... entries) throws IllegalStateExc
* @param player the player to search for
* @return true if the player is a member of this team
* @throws IllegalStateException if this team has been unregistered
* @throws IllegalArgumentException if {@link OfflinePlayer#getName()} is null
* @see #hasEntry(String)
*/
// @Deprecated(since = "1.8.6") // Paper
boolean hasPlayer(@NotNull OfflinePlayer player);
/**
* Checks to see if the specified entry is a member of this team.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ public int getSize() {
@Override
public void addPlayer(OfflinePlayer player) {
Preconditions.checkArgument(player != null, "OfflinePlayer cannot be null");
Preconditions.checkArgument(player.getName() != null, "OfflinePlayer must have a name");
this.addEntry(player.getName());
}

Expand Down Expand Up @@ -256,6 +257,7 @@ public void addEntries(java.util.Collection<String> entries) throws IllegalState
@Override
public boolean removePlayer(OfflinePlayer player) {
Preconditions.checkArgument(player != null, "OfflinePlayer cannot be null");
Preconditions.checkArgument(player.getName() != null, "OfflinePlayer must have a name");
return this.removeEntry(player.getName());
}

Expand Down Expand Up @@ -295,6 +297,7 @@ public boolean removeEntries(java.util.Collection<String> entries) throws Illega
@Override
public boolean hasPlayer(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException {
Preconditions.checkArgument(player != null, "OfflinePlayer cannot be null");
Preconditions.checkArgument(player.getName() != null, "OfflinePlayer must have a name");
return this.hasEntry(player.getName());
}

Expand Down
Loading