feat: add debug notice to server motd

This commit is contained in:
Simon Giesel 2020-05-20 11:20:37 +02:00
parent e8ef3d85af
commit c8435117e2

View file

@ -133,11 +133,13 @@ public class PlayerJoinQuitListener implements Listener {
final LocalDateTime start = instant.atZone(ZoneId.systemDefault()).toLocalDateTime(); final LocalDateTime start = instant.atZone(ZoneId.systemDefault()).toLocalDateTime();
final LocalDateTime current = LocalDateTime.now(); final LocalDateTime current = LocalDateTime.now();
e.setMotd("§9§l" + "VARO" + "§b§l " + "Tag: " + (Duration.between(start, current).toDays() + 1) + "\n§r§7" e.setMotd((this.plugin.getConfig().getBoolean("Varo.Debug") ? "§c§l[DEBUG] " : "") + "§9§l" + "VARO"
+ "powered by " + "§4" + "Cliffbreak.de"); + "§b§l " + "Tag: " + (Duration.between(start, current).toDays() + 1) + "\n§r§7" + "powered by "
+ "§4" + "Cliffbreak.de");
} catch (final Exception ex) { } catch (final Exception ex) {
ex.printStackTrace(); 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");
} }
} }
} }