We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b6223f commit 396fb50Copy full SHA for 396fb50
1 file changed
src/main/java/dev/walshy/sfmetrics/charts/CompatibilityModeChart.java
@@ -6,6 +6,8 @@
6
import org.bstats.json.JsonObjectBuilder;
7
import org.bukkit.Server;
8
9
+import java.lang.reflect.Method;
10
+
11
import javax.annotation.Nonnull;
12
13
/**
@@ -18,7 +20,14 @@ public class CompatibilityModeChart extends SimplePie implements SlimefunMetrics
18
20
19
21
public CompatibilityModeChart() {
22
super("compatibility_mode", () -> {
- 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
31
return enabled ? "enabled" : "disabled";
32
});
33
}
0 commit comments