summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorthylordroot <organicnightmare@gmail.com>2011-01-10 10:10:37 +0800
committerDinner Bone <dinnerbone@dinnerbone.com>2011-01-10 10:32:09 +0800
commite91d5236424050a1936bac95ed9337a287f5e193 (patch)
tree6c4bce11463529e16f5d2f6ce92270d20f7d1558 /src/main/java
parente5d7a4602952369bf6f70f00bbd4f635e02ad36b (diff)
downloadcraftbukkit-e91d5236424050a1936bac95ed9337a287f5e193.tar
craftbukkit-e91d5236424050a1936bac95ed9337a287f5e193.tar.gz
craftbukkit-e91d5236424050a1936bac95ed9337a287f5e193.tar.lz
craftbukkit-e91d5236424050a1936bac95ed9337a287f5e193.tar.xz
craftbukkit-e91d5236424050a1936bac95ed9337a287f5e193.zip
Bukkit Timers, now with 100% less github-services branch.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java7
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java6
2 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b54a1d4c..3be4aab1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -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();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c3b9c7cd..14eb19a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -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;