mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 18:45:21 +01:00
Fix rare issue trying to update players before bluemap fully initiallized
This commit is contained in:
parent
efd365daeb
commit
e314d6597e
@ -140,15 +140,15 @@ public void onEnable() {
|
||||
onlinePlayerList.add(bukkitPlayer);
|
||||
}
|
||||
|
||||
//start updating players
|
||||
getServer().getScheduler().runTaskTimer(this, this::updateSomePlayers, 1, 1);
|
||||
|
||||
//load bluemap
|
||||
getServer().getScheduler().runTaskAsynchronously(this, () -> {
|
||||
try {
|
||||
Logger.global.logInfo("Loading...");
|
||||
this.pluginInstance.load();
|
||||
if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!");
|
||||
|
||||
//start updating players
|
||||
getServer().getScheduler().runTaskTimer(this, this::updateSomePlayers, 1, 1);
|
||||
} catch (IOException | RuntimeException e) {
|
||||
Logger.global.logError("Failed to load!", e);
|
||||
this.pluginInstance.unload();
|
||||
|
Loading…
Reference in New Issue
Block a user