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);
|
onlinePlayerList.add(bukkitPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
//start updating players
|
|
||||||
getServer().getScheduler().runTaskTimer(this, this::updateSomePlayers, 1, 1);
|
|
||||||
|
|
||||||
//load bluemap
|
//load bluemap
|
||||||
getServer().getScheduler().runTaskAsynchronously(this, () -> {
|
getServer().getScheduler().runTaskAsynchronously(this, () -> {
|
||||||
try {
|
try {
|
||||||
Logger.global.logInfo("Loading...");
|
Logger.global.logInfo("Loading...");
|
||||||
this.pluginInstance.load();
|
this.pluginInstance.load();
|
||||||
if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!");
|
if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!");
|
||||||
|
|
||||||
|
//start updating players
|
||||||
|
getServer().getScheduler().runTaskTimer(this, this::updateSomePlayers, 1, 1);
|
||||||
} catch (IOException | RuntimeException e) {
|
} catch (IOException | RuntimeException e) {
|
||||||
Logger.global.logError("Failed to load!", e);
|
Logger.global.logError("Failed to load!", e);
|
||||||
this.pluginInstance.unload();
|
this.pluginInstance.unload();
|
||||||
|
Loading…
Reference in New Issue
Block a user