Scheduler Debug-Messages

This commit is contained in:
Jascha Starke 2013-09-22 11:04:09 +02:00
parent c4fffc9059
commit c2ac988439
3 changed files with 8 additions and 0 deletions

View file

@ -119,6 +119,8 @@ public class FeatureBlockItemSpawn extends CoreModule<LimitedCreative> implement
public long maxTime = 0;
@Override
public void run() {
if (plugin.isDebug())
plugin.getLog().debug("Scheduler: Synchronous Task run: Cleanup");
Iterator<BlockItemDrop> i = list.iterator();
while (i.hasNext()) {
BlockItemDrop block = i.next();

View file

@ -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"));
}

View file

@ -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();