Skip to content

Commit 640c5e8

Browse files
committed
organize reflections
1 parent 6b9c20c commit 640c5e8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

bukkit/src/main/java/revxrsal/commands/bukkit/brigadier/CommodoreProvider.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ private static Function<Plugin, Commodore> checkSupported() {
5151
return null;
5252
}
5353

54+
// try reflection impl
55+
try {
56+
ReflectionCommodore.ensureSetup();
57+
return ReflectionCommodore::new;
58+
} catch (Throwable e) {
59+
printDebugInfo(e);
60+
}
61+
5462
// try the paper impl
5563
try {
5664
Constructor<? extends Commodore> ctr = Class.forName("revxrsal.commands.bukkit.brigadier.PaperCommodore")
@@ -69,13 +77,6 @@ private static Function<Plugin, Commodore> checkSupported() {
6977
printDebugInfo(e);
7078
}
7179

72-
// try reflection impl
73-
try {
74-
ReflectionCommodore.ensureSetup();
75-
return ReflectionCommodore::new;
76-
} catch (Throwable e) {
77-
printDebugInfo(e);
78-
}
7980
return null;
8081
}
8182

0 commit comments

Comments
 (0)