From aa4d1cbe981b17203ae3add708bd0d50bdb677ee Mon Sep 17 00:00:00 2001 From: Itz_KiwiSap_ Date: Thu, 6 Jul 2023 14:41:17 +0200 Subject: [PATCH] Added methods to get loaders from JavaExtensionLoader --- .../java/mc/replay/extensions/JavaExtensionLoader.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ExtensionLoader/src/main/java/mc/replay/extensions/JavaExtensionLoader.java b/ExtensionLoader/src/main/java/mc/replay/extensions/JavaExtensionLoader.java index 1bdc981..8689c98 100644 --- a/ExtensionLoader/src/main/java/mc/replay/extensions/JavaExtensionLoader.java +++ b/ExtensionLoader/src/main/java/mc/replay/extensions/JavaExtensionLoader.java @@ -35,6 +35,14 @@ public JavaExtensionLoader(@NotNull File folder) { return new TreeSet<>(this.loaders.values().stream().map(JavaExtensionClassLoader::getExtension).toList()); } + public final @NotNull Map getLoadersByName() { + return new HashMap<>(this.loaders); + } + + public @NotNull Collection getLoaders() { + return new HashSet<>(this.loaders.values()); + } + @SuppressWarnings("unchecked") @Override @Nullable