mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
Bukkit Timers, now with 100% less github-services branch.
This commit is contained in:
parent
e5d7a46029
commit
e91d523642
@ -123,6 +123,9 @@ implements ICommandListener, Runnable {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
a.info("Starting timer event scheduler");
|
||||
server.getScheduler().start();
|
||||
|
||||
e();
|
||||
}
|
||||
@ -147,6 +150,10 @@ implements ICommandListener, Runnable {
|
||||
|
||||
private void g() {
|
||||
a.info("Stopping server");
|
||||
|
||||
a.info("Starting timer event scheduler");
|
||||
server.getScheduler().disable();
|
||||
|
||||
if (f != null) {
|
||||
f.d();
|
||||
}
|
||||
|
@ -21,12 +21,14 @@ public final class CraftServer implements Server {
|
||||
|
||||
protected final MinecraftServer console;
|
||||
protected final ServerConfigurationManager server;
|
||||
protected CraftScheduler scheduler;
|
||||
|
||||
public CraftServer(MinecraftServer console, ServerConfigurationManager server) {
|
||||
this.console = console;
|
||||
this.server = server;
|
||||
|
||||
pluginManager.RegisterInterface(JavaPluginLoader.class);
|
||||
scheduler = new CraftScheduler(this);
|
||||
}
|
||||
|
||||
public void loadPlugins() {
|
||||
@ -118,6 +120,10 @@ public final class CraftServer implements Server {
|
||||
public void setTime(long time) {
|
||||
console.e.e = time;
|
||||
}
|
||||
|
||||
public CraftScheduler getScheduler() {
|
||||
return scheduler;
|
||||
}
|
||||
|
||||
public ServerConfigurationManager getHandle() {
|
||||
return server;
|
||||
|
Loading…
Reference in New Issue
Block a user