2828import dev .walshy .sfmetrics .charts .SlimefunVersionChart ;
2929import dev .walshy .sfmetrics .charts .TickRateChart ;
3030import io .github .thebusybiscuit .slimefun4 .api .SlimefunBranch ;
31- import io .github .thebusybiscuit .slimefun4 .implementation .SlimefunPlugin ;
31+ import io .github .thebusybiscuit .slimefun4 .implementation .Slimefun ;
3232
3333public class MetricsModule {
3434
@@ -45,10 +45,10 @@ public class MetricsModule {
4545 private MetricsModule () {}
4646
4747 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 ();
5252
5353 addChart (metrics , AutoUpdaterChart ::new );
5454 addChart (metrics , ResourcePackChart ::new );
@@ -70,8 +70,8 @@ public static void start() {
7070 addChart (metrics , DisabledItemsChart ::new );
7171 addChart (metrics , AverageTimingsChart ::new );
7272
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 });
7575 }
7676
7777 @ ParametersAreNonnullByDefault
@@ -100,9 +100,9 @@ private static <T extends CustomChart & SlimefunMetricsChart> void addChart(Metr
100100 @ ParametersAreNonnullByDefault
101101 private static void warn (String chartName , Throwable x ) {
102102 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!" );
104104 }
105105
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 );
107107 }
108108}
0 commit comments