added main plugin command

This commit is contained in:
hyperdefined
2022-01-29 14:39:20 -05:00
parent 46fe889c96
commit 49d864833b
3 changed files with 69 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ package lol.hyper.toolstats;
import lol.hyper.githubreleaseapi.GitHubRelease;
import lol.hyper.githubreleaseapi.GitHubReleaseAPI;
import lol.hyper.toolstats.commands.CommandToolStats;
import lol.hyper.toolstats.events.*;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
@@ -61,6 +62,7 @@ public final class ToolStats extends JavaPlugin {
public EntityDamage mobKill;
public PlayerFish playerFish;
public SheepShear sheepShear;
public CommandToolStats commandToolStats;
public final Logger logger = this.getLogger();
public final File configFile = new File(this.getDataFolder(), "config.yml");
@@ -80,6 +82,7 @@ public final class ToolStats extends JavaPlugin {
mobKill = new EntityDamage(this);
playerFish = new PlayerFish(this);
sheepShear = new SheepShear(this);
commandToolStats = new CommandToolStats(this);
Bukkit.getServer().getPluginManager().registerEvents(blocksMined, this);
Bukkit.getServer().getPluginManager().registerEvents(craftItem, this);
@@ -88,6 +91,8 @@ public final class ToolStats extends JavaPlugin {
Bukkit.getServer().getPluginManager().registerEvents(playerFish, this);
Bukkit.getServer().getPluginManager().registerEvents(sheepShear, this);
this.getCommand("toolstats").setExecutor(commandToolStats);
new Metrics(this, 14110);
Bukkit.getScheduler().runTaskAsynchronously(this, this::checkForUpdates);