From c2ac9884397deef5e8fcae417b22db2999160f8e Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sun, 22 Sep 2013 11:04:09 +0200 Subject: [PATCH] Scheduler Debug-Messages --- .../minecraft/limitedcreative/FeatureBlockItemSpawn.java | 2 ++ .../jaschastarke/minecraft/limitedcreative/MainCommand.java | 4 ++++ .../limitedcreative/blockstate/BlockStateCommand.java | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureBlockItemSpawn.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureBlockItemSpawn.java index 5b9ee9c..6ce6a97 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureBlockItemSpawn.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/FeatureBlockItemSpawn.java @@ -119,6 +119,8 @@ public class FeatureBlockItemSpawn extends CoreModule implement public long maxTime = 0; @Override public void run() { + if (plugin.isDebug()) + plugin.getLog().debug("Scheduler: Synchronous Task run: Cleanup"); Iterator i = list.iterator(); while (i.hasNext()) { BlockItemDrop block = i.next(); diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/MainCommand.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/MainCommand.java index 7fe8ed1..43347d7 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/MainCommand.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/MainCommand.java @@ -69,11 +69,15 @@ public class MainCommand extends BukkitCommand implements IHelpDescribed, IMetho plugin.getServer().getScheduler().runTask(plugin, new Runnable() { @Override public void run() { + if (plugin.isDebug()) + plugin.getLog().debug("Scheduler: Synchronous Task run: Disable"); plugin.onDisable(); plugin.getPluginConfig().reload(); plugin.getServer().getScheduler().runTask(plugin, new Runnable() { @Override public void run() { + if (plugin.isDebug()) + plugin.getLog().debug("Scheduler: Synchronous Task run: Enable"); plugin.onEnable(); context.response(context.getFormatter().getString("command.config.reload.success")); } diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateCommand.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateCommand.java index b1213a0..e3df99f 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateCommand.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateCommand.java @@ -128,6 +128,8 @@ public class BlockStateCommand extends BukkitCommand implements IHelpDescribed { mod.getPlugin().getServer().getScheduler().runTaskAsynchronously(mod.getPlugin(), new BukkitRunnable() { @Override public void run() { + if (mod.isDebug()) + mod.getLog().debug("Scheduler: Asynchronous Task run"); DBQueries q = mod.getQueries(); try { q.getDB().startTransaction();