28
28
import dev .walshy .sfmetrics .charts .SlimefunVersionChart ;
29
29
import dev .walshy .sfmetrics .charts .TickRateChart ;
30
30
import io .github .thebusybiscuit .slimefun4 .api .SlimefunBranch ;
31
- import io .github .thebusybiscuit .slimefun4 .implementation .SlimefunPlugin ;
31
+ import io .github .thebusybiscuit .slimefun4 .implementation .Slimefun ;
32
32
33
33
public class MetricsModule {
34
34
@@ -45,10 +45,10 @@ public class MetricsModule {
45
45
private MetricsModule () {}
46
46
47
47
public static void start () {
48
- Metrics metrics = new Metrics (SlimefunPlugin .instance (), PLUGIN_ID );
49
- branch = SlimefunPlugin .getUpdater ().getBranch ();
50
- slimefunVersion = SlimefunPlugin .getUpdater ().getBuildNumber ();
51
- metricsAutoUpdates = SlimefunPlugin .getMetricsService ().hasAutoUpdates ();
48
+ Metrics metrics = new Metrics (Slimefun .instance (), PLUGIN_ID );
49
+ branch = Slimefun .getUpdater ().getBranch ();
50
+ slimefunVersion = Slimefun .getUpdater ().getBuildNumber ();
51
+ metricsAutoUpdates = Slimefun .getMetricsService ().hasAutoUpdates ();
52
52
53
53
addChart (metrics , AutoUpdaterChart ::new );
54
54
addChart (metrics , ResourcePackChart ::new );
@@ -70,8 +70,8 @@ public static void start() {
70
70
addChart (metrics , DisabledItemsChart ::new );
71
71
addChart (metrics , AverageTimingsChart ::new );
72
72
73
- SlimefunPlugin .instance ().getLogger ().log (Level .INFO , "Now running MetricsModule build #{0}" , VERSION );
74
- SlimefunPlugin .instance ().getLogger ().log (Level .INFO , "with a total of {0}/{1} chart(s)!" , new Object [] { enabledCharts , totalCharts });
73
+ Slimefun .instance ().getLogger ().log (Level .INFO , "Now running MetricsModule build #{0}" , VERSION );
74
+ Slimefun .instance ().getLogger ().log (Level .INFO , "with a total of {0}/{1} chart(s)!" , new Object [] { enabledCharts , totalCharts });
75
75
}
76
76
77
77
@ ParametersAreNonnullByDefault
@@ -100,9 +100,9 @@ private static <T extends CustomChart & SlimefunMetricsChart> void addChart(Metr
100
100
@ ParametersAreNonnullByDefault
101
101
private static void warn (String chartName , Throwable x ) {
102
102
if (!metricsAutoUpdates ) {
103
- SlimefunPlugin .instance ().getLogger ().log (Level .WARNING , "Turn on Auto-Updates for Slimefun-Metrics to avoid this issue!" );
103
+ Slimefun .instance ().getLogger ().log (Level .WARNING , "Turn on Auto-Updates for Slimefun-Metrics to avoid this issue!" );
104
104
}
105
105
106
- SlimefunPlugin .instance ().getLogger ().log (Level .WARNING , x , () -> "Failed to load bStats Chart \" " + chartName + "\" for Metrics #" + VERSION );
106
+ Slimefun .instance ().getLogger ().log (Level .WARNING , x , () -> "Failed to load bStats Chart \" " + chartName + "\" for Metrics #" + VERSION );
107
107
}
108
108
}
0 commit comments