removed webserver shutdown
This commit is contained in:
parent
125b604393
commit
01d1926104
@ -19,7 +19,6 @@ public final class Main extends JavaPlugin {
|
||||
private static Logger logger;
|
||||
|
||||
private List<Appliance> appliances;
|
||||
private HttpServer httpApi;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
@ -62,7 +61,7 @@ public final class Main extends JavaPlugin {
|
||||
Main.logger().info(String.format("Initialized %d appliances!", appliances.size()));
|
||||
|
||||
Main.logger().info("Starting HTTP API...");
|
||||
this.httpApi = new HttpServer();
|
||||
new HttpServer();
|
||||
|
||||
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
||||
Main.logger().info("Startup complete!");
|
||||
@ -76,7 +75,7 @@ public final class Main extends JavaPlugin {
|
||||
appliance.onDisable();
|
||||
appliance.destruct(this);
|
||||
});
|
||||
this.httpApi.stop();
|
||||
|
||||
HandlerList.unregisterAll(this);
|
||||
Bukkit.getScheduler().cancelTasks(this);
|
||||
Main.logger().info("Disabled " + appliances.size() + " appliances!");
|
||||
|
@ -24,10 +24,6 @@ public class HttpServer {
|
||||
Main.instance().getAppliances().forEach(appliance -> appliance.httpApi(new ApiBuilder(appliance)));
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
Spark.stop();
|
||||
}
|
||||
|
||||
public record Response(Status status, Object error, Object response) {
|
||||
public enum Status {
|
||||
FAILURE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user