diff options
Diffstat (limited to 'spark-bukkit')
-rw-r--r-- | spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitSparkPlugin.java | 7 | ||||
-rw-r--r-- | spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitSparkPlugin.java b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitSparkPlugin.java index fddd66b..5737d3d 100644 --- a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitSparkPlugin.java +++ b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitSparkPlugin.java @@ -50,14 +50,16 @@ import java.util.stream.Stream; public class BukkitSparkPlugin extends JavaPlugin implements SparkPlugin { private BukkitAudiences audienceFactory; + private ThreadDumper gameThreadDumper; + private SparkPlatform platform; private CommandExecutor tpsCommand = null; - private final ThreadDumper.GameThread threadDumper = new ThreadDumper.GameThread(); @Override public void onEnable() { this.audienceFactory = BukkitAudiences.create(this); + this.gameThreadDumper = new ThreadDumper.Specific(Thread.currentThread()); this.platform = new SparkPlatform(this); this.platform.enable(); @@ -102,7 +104,6 @@ public class BukkitSparkPlugin extends JavaPlugin implements SparkPlugin { @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { - this.threadDumper.ensureSetup(); this.platform.executeCommand(new BukkitCommandSender(sender, this.audienceFactory), args); return true; } @@ -152,7 +153,7 @@ public class BukkitSparkPlugin extends JavaPlugin implements SparkPlugin { @Override public ThreadDumper getDefaultThreadDumper() { - return this.threadDumper.get(); + return this.gameThreadDumper; } @Override diff --git a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java index f34899b..5d50eeb 100644 --- a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java +++ b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitWorldInfoProvider.java @@ -31,7 +31,6 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; public class BukkitWorldInfoProvider implements WorldInfoProvider { |