mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-25 18:27:36 +01:00
Give a name to the startup task (for timings).
This commit is contained in:
parent
e9d81bd513
commit
896609d046
@ -4,7 +4,6 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
|
||||||
|
|
||||||
import com.gmail.filoghost.holographicdisplays.SimpleUpdater.ResponseHandler;
|
import com.gmail.filoghost.holographicdisplays.SimpleUpdater.ResponseHandler;
|
||||||
import com.gmail.filoghost.holographicdisplays.bridge.bungeecord.BungeeServerTracker;
|
import com.gmail.filoghost.holographicdisplays.bridge.bungeecord.BungeeServerTracker;
|
||||||
@ -24,6 +23,7 @@ import com.gmail.filoghost.holographicdisplays.object.NamedHologramManager;
|
|||||||
import com.gmail.filoghost.holographicdisplays.placeholder.AnimationsRegister;
|
import com.gmail.filoghost.holographicdisplays.placeholder.AnimationsRegister;
|
||||||
import com.gmail.filoghost.holographicdisplays.placeholder.PlaceholdersManager;
|
import com.gmail.filoghost.holographicdisplays.placeholder.PlaceholdersManager;
|
||||||
import com.gmail.filoghost.holographicdisplays.task.BungeeCleanupTask;
|
import com.gmail.filoghost.holographicdisplays.task.BungeeCleanupTask;
|
||||||
|
import com.gmail.filoghost.holographicdisplays.task.StartupLoadHologramsTask;
|
||||||
import com.gmail.filoghost.holographicdisplays.task.WorldPlayerCounterTask;
|
import com.gmail.filoghost.holographicdisplays.task.WorldPlayerCounterTask;
|
||||||
import com.gmail.filoghost.holographicdisplays.util.VersionUtils;
|
import com.gmail.filoghost.holographicdisplays.util.VersionUtils;
|
||||||
|
|
||||||
@ -203,14 +203,7 @@ public class HolographicDisplays extends JavaPlugin {
|
|||||||
} catch (Exception ignore) { }
|
} catch (Exception ignore) { }
|
||||||
|
|
||||||
// The entities are loaded when the server is ready.
|
// The entities are loaded when the server is ready.
|
||||||
new BukkitRunnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new StartupLoadHologramsTask(), 10L);
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
for (NamedHologram hologram : NamedHologramManager.getHolograms()) {
|
|
||||||
hologram.refreshAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}.runTaskLater(this, 10L);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.gmail.filoghost.holographicdisplays.task;
|
||||||
|
|
||||||
|
import com.gmail.filoghost.holographicdisplays.object.NamedHologram;
|
||||||
|
import com.gmail.filoghost.holographicdisplays.object.NamedHologramManager;
|
||||||
|
|
||||||
|
public class StartupLoadHologramsTask implements Runnable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
for (NamedHologram hologram : NamedHologramManager.getHolograms()) {
|
||||||
|
hologram.refreshAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user