Skip to content

Commit

Permalink
Add method for registering multiple audio source managers in one go (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin authored Jun 5, 2024
1 parent dd8d1ae commit 5d4be66
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ public interface AudioPlayerManager {
*/
void registerSourceManager(AudioSourceManager sourceManager);

/**
* Same as {@link #registerSourceManager(AudioSourceManager)} but registers multiple in one call.
* @param sourceManagers The source managers to register, which will be used for subsequent loadItem calls
*/
default void registerSourceManagers(AudioSourceManager... sourceManagers) {
for (AudioSourceManager sourceManager : sourceManagers) {
registerSourceManager(sourceManager);
}
}

/**
* Shortcut for accessing a source manager of a certain class.
*
Expand Down

0 comments on commit 5d4be66

Please sign in to comment.