Avoid shutdown exception due to bukkit 'improvements'

This commit is contained in:
Mike Primm 2013-04-21 21:05:12 -05:00
parent 7c6e660cf0
commit 99ea38d02a

View File

@ -242,7 +242,10 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
} }
@Override @Override
public <T> Future<T> callSyncMethod(Callable<T> task) { public <T> Future<T> callSyncMethod(Callable<T> task) {
return getServer().getScheduler().callSyncMethod(DynmapPlugin.this, task); if(DynmapPlugin.this.isEnabled())
return getServer().getScheduler().callSyncMethod(DynmapPlugin.this, task);
else
return null;
} }
@Override @Override
public String getServerName() { public String getServerName() {
@ -472,6 +475,9 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
return exhausted; return exhausted;
} }
}); });
if (f == null) {
return null;
}
Boolean delay; Boolean delay;
try { try {
delay = f.get(); delay = f.get();