Skip to content

Commit

Permalink
feat: add TabList#addEntries (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
powercasgamer authored Aug 12, 2023
1 parent be9ecf7 commit 81b45d7
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,28 @@ public interface TabList {
*/
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
* the specified {@link UUID}.
Expand Down

0 comments on commit 81b45d7

Please sign in to comment.