From c8435117e20700f287e50eef2bb158869cce3845 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 20 May 2020 11:20:37 +0200 Subject: [PATCH] feat: add debug notice to server motd --- .../cliffbreak/varo/listeners/PlayerJoinQuitListener.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java b/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java index 79c672e..07b74f3 100644 --- a/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java +++ b/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java @@ -133,11 +133,13 @@ public class PlayerJoinQuitListener implements Listener { final LocalDateTime start = instant.atZone(ZoneId.systemDefault()).toLocalDateTime(); final LocalDateTime current = LocalDateTime.now(); - e.setMotd("§9§l" + "VARO" + "§b§l " + "Tag: " + (Duration.between(start, current).toDays() + 1) + "\n§r§7" - + "powered by " + "§4" + "Cliffbreak.de"); + e.setMotd((this.plugin.getConfig().getBoolean("Varo.Debug") ? "§c§l[DEBUG] " : "") + "§9§l" + "VARO" + + "§b§l " + "Tag: " + (Duration.between(start, current).toDays() + 1) + "\n§r§7" + "powered by " + + "§4" + "Cliffbreak.de"); } catch (final Exception ex) { ex.printStackTrace(); - e.setMotd("§9§l" + "VARO" + "§b§l " + "Tag: -1" + "\n§r§7" + "powered by " + "§4" + "Cliffbreak.de"); + e.setMotd((this.plugin.getConfig().getBoolean("Varo.Debug") ? "§c§l[DEBUG] " : "") + "§9§l" + "VARO" + + "§b§l " + "Tag: -1" + "\n§r§7" + "powered by " + "§4" + "Cliffbreak.de"); } } } \ No newline at end of file