diff --git a/src/main/java/wtf/beatrice/hidekobot/utils/Logger.java b/src/main/java/wtf/beatrice/hidekobot/utils/Logger.java index 2fca360..f819d4a 100644 --- a/src/main/java/wtf/beatrice/hidekobot/utils/Logger.java +++ b/src/main/java/wtf/beatrice/hidekobot/utils/Logger.java @@ -47,16 +47,8 @@ public class Logger public void log(String message, int delay) { // create a new scheduled executor with an anonymous runnable... - Executors.newSingleThreadScheduledExecutor().schedule(new Runnable() - { - @Override - public void run() - { - // log the message - log(message); - } - //... after waiting X seconds. - }, delay, TimeUnit.SECONDS); + //... after waiting seconds. + Executors.newSingleThreadScheduledExecutor().schedule(() -> log(message), delay, TimeUnit.SECONDS); }