diff --git a/src/main/java/com/pikachu/webaddon/skript/scopes/http/ScopeHTTPServer.java b/src/main/java/com/pikachu/webaddon/skript/scopes/http/ScopeHTTPServer.java index 503f1c7..4b02fbf 100644 --- a/src/main/java/com/pikachu/webaddon/skript/scopes/http/ScopeHTTPServer.java +++ b/src/main/java/com/pikachu/webaddon/skript/scopes/http/ScopeHTTPServer.java @@ -110,12 +110,13 @@ public void load() { @Override public void unregister(Trigger t) { // workaround for spark npe - server.get("workaroundForSparkNpe" + UUID.randomUUID().toString(), (req, resp) -> "you shouldn't be seeing this"); + server.options("workaroundForSparkNpe" + UUID.randomUUID().toString(), (req, resp) -> "you shouldn't be seeing this"); server.stop(); } @Override public void unregisterAll() { + unregister(null); } @Override diff --git a/src/main/java/com/pikachu/webaddon/util/VoidLogger.java b/src/main/java/com/pikachu/webaddon/util/VoidLogger.java new file mode 100644 index 0000000..74d8c1a --- /dev/null +++ b/src/main/java/com/pikachu/webaddon/util/VoidLogger.java @@ -0,0 +1,82 @@ +package com.pikachu.webaddon.util; + + +import org.eclipse.jetty.util.log.Logger; + +public class VoidLogger implements Logger { + + @Override + public String getName() { + return "VoidLogger"; + } + + @Override + public void warn(String msg, Object... args) { + + } + + @Override + public void warn(Throwable thrown) { + + } + + @Override + public void warn(String msg, Throwable thrown) { + + } + + @Override + public void info(String msg, Object... args) { + + } + + @Override + public void info(Throwable thrown) { + + } + + @Override + public void info(String msg, Throwable thrown) { + + } + + @Override + public boolean isDebugEnabled() { + return false; + } + + @Override + public void setDebugEnabled(boolean enabled) { + + } + + @Override + public void debug(String msg, Object... args) { + + } + + @Override + public void debug(String msg, long value) { + + } + + @Override + public void debug(Throwable thrown) { + + } + + @Override + public void debug(String msg, Throwable thrown) { + + } + + @Override + public Logger getLogger(String name) { + return new VoidLogger(); + } + + @Override + public void ignore(Throwable ignored) { + + } +}