Commit 9a877b2b authored by liujiahua123123's avatar liujiahua123123

Server

parent f6c489f9
......@@ -16,13 +16,18 @@ public class MiraiServer {
protected MiraiServer(){
instance = this;
this.onLoad();
Thread.yield();
this.onEnable();
}
boolean isEnabled;
private boolean enabled;
protected void shutdown(){
if(this.isEnabled) {
if(this.enabled) {
this.getEventManager().boardcastEvent(new ServerDisableEvent());
}
}
......@@ -46,8 +51,12 @@ public class MiraiServer {
this.shutdown();
}
}
private void onEnable(){
this.eventManager.boardcastEvent(new ServerEnableEvent());
this.isEnabled = true;
this.enabled = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment