File tree Expand file tree Collapse file tree
src/main/java/com/github/rlf/cargomanagement Expand file tree Collapse file tree Original file line number Diff line number Diff line change 395395 <artifactId >po-utils</artifactId >
396396 <version >${po-utils.version} </version >
397397 </dependency >
398+ <dependency >
399+ <groupId >org.bstats</groupId >
400+ <artifactId >bstats-bukkit</artifactId >
401+ <version >1.2</version >
402+ <scope >compile</scope >
403+ </dependency >
398404
399405 <!-- TEST -->
400406 <dependency >
Original file line number Diff line number Diff line change 1010import com .github .rlf .cargomanagement .storage .MemoryBlockStorage ;
1111import dk .lockfuglsang .minecraft .file .FileUtil ;
1212import dk .lockfuglsang .minecraft .util .TimeUtil ;
13+ import javafx .scene .chart .PieChart ;
14+ import org .bstats .bukkit .Metrics ;
1315import org .bukkit .Bukkit ;
1416import org .bukkit .command .Command ;
1517import org .bukkit .command .CommandSender ;
@@ -53,6 +55,12 @@ private void initializePlugin() {
5355 getCommand ("cargo" ).setExecutor (new CargoCommand (this , storage , nodeFactory ));
5456 configureTickTimer (config );
5557 configureRecipes (config , nodeFactory );
58+ try {
59+ Metrics metrics = new Metrics (this );
60+ metrics .addCustomChart (new Metrics .SimplePie ("connector_range" , () -> "" +ConnectorNode .RANGE ));
61+ } catch (Exception e ) {
62+ getLogger ().log (Level .WARNING , "Unable to enable metrics" );
63+ }
5664 }
5765
5866 private void configureRecipes (FileConfiguration config , CargoNodeFactory nodeFactory ) {
You can’t perform that action at this time.
0 commit comments