diff --git a/pom.xml b/pom.xml index 6a28510..e9326d5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.ShakeforProtein TreeboTimed - 0.1.1 + 0.1.2 jar TreeboTimed @@ -43,6 +43,29 @@ + + org.apache.maven.plugins + maven-shade-plugin + 3.1.0 + + + + + org.bstats + + me.shakeforprotein.treebotimed + + + + + + package + + shade + + + + @@ -65,7 +88,10 @@ enginehub-maven http://maven.enginehub.org/repo/ - + + CodeMC + https://repo.codemc.org/repository/maven-public + @@ -86,5 +112,13 @@ worldedit-bukkit 7.0.0-SNAPSHOT + + org.bstats + bstats-bukkit + 1.5 + compile + + + diff --git a/src/main/java/me/shakeforprotein/treebotimed/TreeboTimed.java b/src/main/java/me/shakeforprotein/treebotimed/TreeboTimed.java index 255f5d2..a1c194a 100644 --- a/src/main/java/me/shakeforprotein/treebotimed/TreeboTimed.java +++ b/src/main/java/me/shakeforprotein/treebotimed/TreeboTimed.java @@ -3,6 +3,7 @@ import com.sk89q.worldedit.WorldEdit; import me.shakeforprotein.treebotimed.Commands.*; import me.shakeforprotein.treebotimed.Listeners.PlaceSchem; +import org.bstats.bukkit.Metrics; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -44,11 +45,17 @@ public void onEnable() { this.getCommand("giveblueprint").setExecutor(new GiveBlueprint(this)); this.getCommand("copyStone").setExecutor(new CopyStone()); Bukkit.getPluginManager().registerEvents(new PlaceSchem(this), this); - setStoneQue(); + if(getConfig().getBoolean("allowGenerateOres")) { + setStoneQue(); + } if (getConfig().getBoolean("automaticPasting")) { setSchedule(); } - + if(getConfig().get("bstatsIntegration") != null) { + if (getConfig().getBoolean("bstatsIntegration")) { + Metrics metrics = new Metrics(this); + } + } } @Override @@ -77,7 +84,8 @@ public boolean accept(File dir, String name) { Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() { @Override public void run() { - Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "pasteatorigin " + schematic.getAbsolutePath().replace(".scm", "")); + //System.out.println(schematic.getAbsolutePath().replace(".scm", "")); + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "pasteatorigin " + schematic.getName().replace(".scm", "")); } }, (interval * count), timespan); count++; @@ -94,7 +102,7 @@ public void run() { if (p.getLocation().getBlockX() > (x - 50) && p.getLocation().getBlockX() < (x + 50)) { if (p.getLocation().getBlockZ() > (z - 50) && p.getLocation().getBlockZ() < (z + 50)) { if (p.getLocation().getBlockY() > (y - 15) && p.getLocation().getBlockY() < (y + 50)) { - p.sendMessage(badge + " Resetting farm " + ChatColor.GOLD + schematic.getName().replace(".scm", "") + ChatColor.RESET + " in " + ChatColor.RED + ChatColor.BOLD + "ONE" + ChatColor.RESET + " Minute"); + //p.sendMessage(badge + " Resetting farm " + ChatColor.GOLD + schematic.getName().replace(".scm", "") + ChatColor.RESET + " in " + ChatColor.RED + ChatColor.BOLD + "ONE" + ChatColor.RESET + " Minute"); } } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 74ba8fd..219e956 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,6 +1,8 @@ automaticPasting: true +allowGenerateOres: false totalInterval: 30 stoneRegenModifier: 40 +bstatsIntegration: true badge: '&3&l[&2Treebo Timed&3&l]&r' oreWeights: EMERALD_ORE: 100 diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index d0c52b7..80ed4d4 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: TreeboTimed version: ${project.version} main: me.shakeforprotein.treebotimed.TreeboTimed -api-version: 1.15 +api-version: 1.13 authors: [ShakeforProtein] depend: [WorldEdit, WorldGuard] @@ -9,10 +9,10 @@ permissions: treebotimed.doit: default: op treebotimed.admin: - default: false + default: op treebotimed.giveblueprint: description: Allows the use of giveBluprint command - default: false + default: op commands: giveblueprint: