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; public long maxTime = 0;
@Override @Override
public void run() { public void run() {
if (plugin.isDebug())
plugin.getLog().debug("Scheduler: Synchronous Task run: Cleanup");
Iterator<BlockItemDrop> i = list.iterator(); Iterator<BlockItemDrop> i = list.iterator();
while (i.hasNext()) { while (i.hasNext()) {
BlockItemDrop block = i.next(); 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() { plugin.getServer().getScheduler().runTask(plugin, new Runnable() {
@Override @Override
public void run() { public void run() {
if (plugin.isDebug())
plugin.getLog().debug("Scheduler: Synchronous Task run: Disable");
plugin.onDisable(); plugin.onDisable();
plugin.getPluginConfig().reload(); plugin.getPluginConfig().reload();
plugin.getServer().getScheduler().runTask(plugin, new Runnable() { plugin.getServer().getScheduler().runTask(plugin, new Runnable() {
@Override @Override
public void run() { public void run() {
if (plugin.isDebug())
plugin.getLog().debug("Scheduler: Synchronous Task run: Enable");
plugin.onEnable(); plugin.onEnable();
context.response(context.getFormatter().getString("command.config.reload.success")); 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() { mod.getPlugin().getServer().getScheduler().runTaskAsynchronously(mod.getPlugin(), new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
if (mod.isDebug())
mod.getLog().debug("Scheduler: Asynchronous Task run");
DBQueries q = mod.getQueries(); DBQueries q = mod.getQueries();
try { try {
q.getDB().startTransaction(); q.getDB().startTransaction();