Skip to content

Commit e314d65

Browse files
committed
Fix rare issue trying to update players before bluemap fully initiallized
1 parent efd365d commit e314d65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

implementations/spigot/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ public void onEnable() {
140140
onlinePlayerList.add(bukkitPlayer);
141141
}
142142

143-
//start updating players
144-
getServer().getScheduler().runTaskTimer(this, this::updateSomePlayers, 1, 1);
145-
146143
//load bluemap
147144
getServer().getScheduler().runTaskAsynchronously(this, () -> {
148145
try {
149146
Logger.global.logInfo("Loading...");
150147
this.pluginInstance.load();
151148
if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!");
149+
150+
//start updating players
151+
getServer().getScheduler().runTaskTimer(this, this::updateSomePlayers, 1, 1);
152152
} catch (IOException | RuntimeException e) {
153153
Logger.global.logError("Failed to load!", e);
154154
this.pluginInstance.unload();

0 commit comments

Comments
 (0)