3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-06 00:00:47 +01:00

feat: add TabList#addEntries (#987)

Dieser Commit ist enthalten in:
powercas_gamer 2023-08-12 19:49:08 +02:00 committet von GitHub
Ursprung be9ecf75b2
Commit 81b45d710b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -43,6 +43,28 @@ public interface TabList {
*/ */
void addEntry(TabListEntry entry); void addEntry(TabListEntry entry);
/**
* Adds a {@link Iterable} of {@link TabListEntry}'s to the {@link Player}'s tab list.
*
* @param entries to add to the tab list
*/
default void addEntries(Iterable<TabListEntry> entries) {
for (TabListEntry entry : entries) {
addEntry(entry);
}
}
/**
* Adds an array of {@link TabListEntry}'s to the {@link Player}'s tab list.
*
* @param entries to add to the tab list
*/
default void addEntries(TabListEntry... entries) {
for (TabListEntry entry : entries) {
addEntry(entry);
}
}
/** /**
* Removes the {@link TabListEntry} from the tab list with the {@link GameProfile} identified with * Removes the {@link TabListEntry} from the tab list with the {@link GameProfile} identified with
* the specified {@link UUID}. * the specified {@link UUID}.