Skip to content

Commit 07f94f4

Browse files
committed
allow developers to add new registry
1 parent bfde275 commit 07f94f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/library/src/main/java/top/mrxiaom/pluginbase/utils/RegistryConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ protected static void init() {
152152
} catch (Throwable ignored) {}
153153
}
154154

155-
private static void add(String classType, String registry) throws Throwable {
155+
public static void add(String classType, String registry) throws Throwable {
156156
Class<?> type = Class.forName(classType);
157157
Field field = Registry.class.getDeclaredField(registry);
158158
Registry<?> object = (Registry<?>) field.get(null);
159159
registries.put(type.getName(), object);
160160
}
161161

162-
private static <T extends Keyed> void add(Class<T> type, Registry<T> registry) {
162+
public static <T extends Keyed> void add(Class<T> type, Registry<T> registry) {
163163
registries.put(type.getName(), registry);
164164
}
165165

0 commit comments

Comments
 (0)