File tree 1 file changed +10
-1
lines changed
src/main/java/dev/walshy/sfmetrics/charts
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 6
6
import org .bstats .json .JsonObjectBuilder ;
7
7
import org .bukkit .Server ;
8
8
9
+ import java .lang .reflect .Method ;
10
+
9
11
import javax .annotation .Nonnull ;
10
12
11
13
/**
@@ -18,7 +20,14 @@ public class CompatibilityModeChart extends SimplePie implements SlimefunMetrics
18
20
19
21
public CompatibilityModeChart () {
20
22
super ("compatibility_mode" , () -> {
21
- boolean enabled = Slimefun .getRegistry ().isBackwardsCompatible ();
23
+ boolean enabled ;
24
+ try {
25
+ final Method method = Slimefun .getRegistry ().getClass ().getDeclaredMethod ("isBackwardsCompatible" );
26
+ enabled = (boolean ) method .invoke (Slimefun .getRegistry ());
27
+ } catch (Exception e ) {
28
+ enabled = false ;
29
+ }
30
+
22
31
return enabled ? "enabled" : "disabled" ;
23
32
});
24
33
}
You can’t perform that action at this time.
0 commit comments