geforkt von Mirrors/Paper
Multiple Entries with Scoreboards
Dieser Commit ist enthalten in:
Ursprung
3d42540191
Commit
233a293cd1
@ -309,6 +309,60 @@ public interface Team extends net.kyori.adventure.audience.ForwardingAudience {
|
||||
*/
|
||||
void addEntry(@NotNull String entry);
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* This puts a collection of entities onto this team for the scoreboard which results in one
|
||||
* packet for the updates rather than a packet-per-entity.
|
||||
* <p>
|
||||
* Entities on other teams will be removed from their respective teams.
|
||||
*
|
||||
* @param entities the entities to add
|
||||
* @throws IllegalArgumentException if entities are null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
default void addEntities(@NotNull org.bukkit.entity.Entity @NotNull ...entities) {
|
||||
this.addEntities(java.util.List.of(entities));
|
||||
}
|
||||
|
||||
/**
|
||||
* This puts a collection of entities onto this team for the scoreboard which results in one
|
||||
* packet for the updates rather than a packet-per-entity.
|
||||
* <p>
|
||||
* Entities on other teams will be removed from their respective teams.
|
||||
*
|
||||
* @param entities the entities to add
|
||||
* @throws IllegalArgumentException if entities are null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
void addEntities(@NotNull java.util.Collection<org.bukkit.entity.Entity> entities) throws IllegalStateException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* This puts a collection of entries onto this team for the scoreboard which results in one
|
||||
* packet for the updates rather than a packet-per-entry.
|
||||
* <p>
|
||||
* Entries on other teams will be removed from their respective teams.
|
||||
*
|
||||
* @param entries the entries to add
|
||||
* @throws IllegalArgumentException if entries are null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
default void addEntries(@NotNull String... entries) throws IllegalStateException, IllegalArgumentException {
|
||||
this.addEntries(java.util.List.of(entries));
|
||||
}
|
||||
|
||||
/**
|
||||
* This puts a collection of entries onto this team for the scoreboard which results in one
|
||||
* packet for the updates rather than a packet-per-entry.
|
||||
* <p>
|
||||
* Entries on other teams will be removed from their respective teams.
|
||||
*
|
||||
* @param entries the entries to add
|
||||
* @throws IllegalArgumentException if entries are null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
void addEntries(@NotNull java.util.Collection<String> entries) throws IllegalStateException, IllegalArgumentException;
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Removes the player from this team.
|
||||
*
|
||||
@ -329,6 +383,56 @@ public interface Team extends net.kyori.adventure.audience.ForwardingAudience {
|
||||
*/
|
||||
boolean removeEntry(@NotNull String entry);
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Removes a collection of entities from this team which results in one
|
||||
* packet for the updates rather than a packet-per-entity.
|
||||
*
|
||||
* @param entities the entries to remove
|
||||
* @return if any of the entities were a part of this team
|
||||
* @throws IllegalArgumentException if entities is null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
default boolean removeEntities(@NotNull org.bukkit.entity.Entity @NotNull ... entities) throws IllegalStateException, IllegalArgumentException {
|
||||
return this.removeEntities(java.util.List.of(entities));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a collection of entities from this team which results in one
|
||||
* packet for the updates rather than a packet-per-entity.
|
||||
*
|
||||
* @param entities the entries to remove
|
||||
* @return if any of the entities were a part of this team
|
||||
* @throws IllegalArgumentException if entities is null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
boolean removeEntities(@NotNull java.util.Collection<org.bukkit.entity.Entity> entities) throws IllegalStateException, IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Removes a collection of entries from this team which results in one
|
||||
* packet for the updates rather than a packet-per-entry.
|
||||
*
|
||||
* @param entries the entries to remove
|
||||
* @return if any of the entries were a part of this team
|
||||
* @throws IllegalArgumentException if entries is null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
default boolean removeEntries(@NotNull String... entries) throws IllegalStateException, IllegalArgumentException {
|
||||
return this.removeEntries(java.util.List.of(entries));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a collection of entries from this team which results in one
|
||||
* packet for the updates rather than a packet-per-entry.
|
||||
*
|
||||
* @param entries the entries to remove
|
||||
* @return if any of the entries were a part of this team
|
||||
* @throws IllegalArgumentException if entries is null
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
boolean removeEntries(@NotNull java.util.Collection<String> entries) throws IllegalStateException, IllegalArgumentException;
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Unregisters this team from the Scoreboard
|
||||
*
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren