From c0f90e7aa52de3d3da8faafc4a5d2332133218fd Mon Sep 17 00:00:00 2001 From: topi314 Date: Sun, 5 May 2024 19:11:07 +0200 Subject: [PATCH] add registerRemoteSources overload without MediaContainerRegistry --- .../lavaplayer/source/AudioSourceManagers.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main/src/main/java/com/sedmelluq/discord/lavaplayer/source/AudioSourceManagers.java b/main/src/main/java/com/sedmelluq/discord/lavaplayer/source/AudioSourceManagers.java index 8d997806..eacb32f5 100644 --- a/main/src/main/java/com/sedmelluq/discord/lavaplayer/source/AudioSourceManagers.java +++ b/main/src/main/java/com/sedmelluq/discord/lavaplayer/source/AudioSourceManagers.java @@ -47,6 +47,18 @@ public static void registerRemoteSources(AudioPlayerManager playerManager, Media playerManager.registerSourceManager(new HttpAudioSourceManager(containerRegistry)); } + /** + * Registers all built-in remote audio sources to the specified player manager, excluding the specified sources. + * Local file audio source must be registered separately. + * + * @param playerManager Player manager to register the source managers to + * @param excludedSources Source managers to exclude from registration + */ + @SafeVarargs + public static void registerRemoteSources(AudioPlayerManager playerManager, Class... excludedSources) { + registerRemoteSources(playerManager, MediaContainerRegistry.DEFAULT_REGISTRY, excludedSources); + } + /** * Registers all built-in remote audio sources to the specified player manager, excluding the specified sources. * Local file audio source must be registered separately.