Avoid shutdown exception due to bukkit 'improvements'
This commit is contained in:
parent
7c6e660cf0
commit
99ea38d02a
1 changed files with 7 additions and 1 deletions
|
|
@ -242,7 +242,10 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||
}
|
||||
@Override
|
||||
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
|
||||
public String getServerName() {
|
||||
|
|
@ -472,6 +475,9 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||
return exhausted;
|
||||
}
|
||||
});
|
||||
if (f == null) {
|
||||
return null;
|
||||
}
|
||||
Boolean delay;
|
||||
try {
|
||||
delay = f.get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue