File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/main/java/dev/walshy/sfmetrics/charts Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 66import org .bstats .json .JsonObjectBuilder ;
77import org .bukkit .Server ;
88
9+ import java .lang .reflect .Method ;
10+
911import javax .annotation .Nonnull ;
1012
1113/**
@@ -18,7 +20,14 @@ public class CompatibilityModeChart extends SimplePie implements SlimefunMetrics
1820
1921 public CompatibilityModeChart () {
2022 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+
2231 return enabled ? "enabled" : "disabled" ;
2332 });
2433 }
You can’t perform that action at this time.
0 commit comments