Template
mirror of
https://github.com/LOOHP/Limbo.git
synced 2026-10-22 12:38:55 +00:00
Limbo Schedulers
This commit is contained in:
@@ -49,6 +49,8 @@ import com.loohp.limbo.Permissions.PermissionsManager;
|
||||
import com.loohp.limbo.Player.Player;
|
||||
import com.loohp.limbo.Plugins.LimboPlugin;
|
||||
import com.loohp.limbo.Plugins.PluginManager;
|
||||
import com.loohp.limbo.Scheduler.LimboScheduler;
|
||||
import com.loohp.limbo.Scheduler.Tick;
|
||||
import com.loohp.limbo.Server.ServerConnection;
|
||||
import com.loohp.limbo.Server.Packets.Packet;
|
||||
import com.loohp.limbo.Server.Packets.PacketIn;
|
||||
@@ -130,8 +132,8 @@ public class Limbo {
|
||||
|
||||
private DimensionRegistry dimensionRegistry;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private Tick tick;
|
||||
private LimboScheduler scheduler;
|
||||
|
||||
private Metrics metrics;
|
||||
|
||||
@@ -281,6 +283,9 @@ public class Limbo {
|
||||
}
|
||||
}
|
||||
|
||||
scheduler = new LimboScheduler();
|
||||
tick = new Tick(this);
|
||||
|
||||
permissionManager = new PermissionsManager();
|
||||
permissionManager.loadDefaultPermissionFile(permissionFile);
|
||||
|
||||
@@ -314,8 +319,6 @@ public class Limbo {
|
||||
|
||||
server = new ServerConnection(properties.getServerIp(), properties.getServerPort());
|
||||
|
||||
tick = new Tick(this);
|
||||
|
||||
metrics = new Metrics();
|
||||
|
||||
console.run();
|
||||
@@ -325,6 +328,14 @@ public class Limbo {
|
||||
public Unsafe getUnsafe() {
|
||||
return unsafe;
|
||||
}
|
||||
|
||||
public Tick getHeartBeat() {
|
||||
return tick;
|
||||
}
|
||||
|
||||
public LimboScheduler getScheduler() {
|
||||
return scheduler;
|
||||
}
|
||||
|
||||
public DimensionRegistry getDimensionRegistry() {
|
||||
return dimensionRegistry;
|
||||
@@ -494,6 +505,8 @@ public class Limbo {
|
||||
plugin.onDisable();
|
||||
}
|
||||
|
||||
tick.waitAndKillThreads(5000);
|
||||
|
||||
for (Player player : getPlayers()) {
|
||||
player.disconnect("Server closed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user