diff --git a/src/main/java/me/indian/bds/BDSAutoEnable.java b/src/main/java/me/indian/bds/BDSAutoEnable.java index 5128b0a0..cdce3f67 100644 --- a/src/main/java/me/indian/bds/BDSAutoEnable.java +++ b/src/main/java/me/indian/bds/BDSAutoEnable.java @@ -96,7 +96,7 @@ public void init() { this.watchDog.getPackModule().initPackModule(); new RestWebsite(this).init(); this.discord.init(); - this.serverManager.getStatsManager().startCountServerTime(serverProcess); + this.serverManager.getStatsManager().startCountServerTime(this.serverProcess); this.serverProcess.startProcess(); this.versionManager.getVersionUpdater().checkForUpdate(); new AutoMessages(this).start(); diff --git a/src/main/java/me/indian/bds/discord/jda/listener/MessageListener.java b/src/main/java/me/indian/bds/discord/jda/listener/MessageListener.java index 87c62d7b..8369cbe9 100644 --- a/src/main/java/me/indian/bds/discord/jda/listener/MessageListener.java +++ b/src/main/java/me/indian/bds/discord/jda/listener/MessageListener.java @@ -153,8 +153,9 @@ private String generateRawMessage(final Message message){ } private String generatorReply(final Message messageReference) { + //TODO: Dodać opcje wykrycia ręcznego oznaczeń return messageReference == null ? "" : this.discordConfig.getDiscordMessagesConfig().getReplyStatement() - .replaceAll("", this.generateRawMessage(messageReference)) + .replaceAll("", this.generateRawMessage(messageReference).replaceAll("\\*\\*", "")) .replaceAll("", this.getUserName(messageReference.getMember(), messageReference.getAuthor())); } } \ No newline at end of file diff --git a/src/main/java/me/indian/bds/manager/server/ServerManager.java b/src/main/java/me/indian/bds/manager/server/ServerManager.java index 66857be9..a81341db 100644 --- a/src/main/java/me/indian/bds/manager/server/ServerManager.java +++ b/src/main/java/me/indian/bds/manager/server/ServerManager.java @@ -36,6 +36,7 @@ public ServerManager(final BDSAutoEnable bdsAutoEnable) { public void initFromLog(final String logEntry) { this.service.execute(() -> { + //Metody związane z graczem this.playerJoin(logEntry); this.playerQuit(logEntry); this.chatMessage(logEntry); diff --git a/src/main/java/me/indian/bds/server/ServerProcess.java b/src/main/java/me/indian/bds/server/ServerProcess.java index ab542a6c..44866bd7 100644 --- a/src/main/java/me/indian/bds/server/ServerProcess.java +++ b/src/main/java/me/indian/bds/server/ServerProcess.java @@ -346,6 +346,7 @@ public void sendToConsole(final String command) { outputStream.write((command + "\n").getBytes()); outputStream.flush(); + this.logger.debug("Wysłano &b" + command); } catch(final Exception exception){ this.logger.error("Wystąpił błąd podczas próby wysłania polecenia do konsoli" , exception); @@ -439,8 +440,6 @@ public Process getProcess() { return this.process; } -//TODO: dodać metodę do liczenia czasu online servera - private boolean containsNotAllowedToFileLog(final String msg) { for (final String s : this.config.getLogConfig().getNoFile()) { if (msg.toLowerCase().contains(s.toLowerCase())) { diff --git a/src/main/java/me/indian/bds/watchdog/module/AutoRestartModule.java b/src/main/java/me/indian/bds/watchdog/module/AutoRestartModule.java index 692d4fd5..c91b56cb 100644 --- a/src/main/java/me/indian/bds/watchdog/module/AutoRestartModule.java +++ b/src/main/java/me/indian/bds/watchdog/module/AutoRestartModule.java @@ -74,6 +74,9 @@ public void restart(final boolean alert) { this.logger.error("Nie można zrestartować servera gdy jest on wyłączony!"); return; } + this.serverProcess.tellrawToAllAndLogger(this.prefix, + "&aPrzygotowanie do&b restartu&a servera", + LogState.WARNING); this.watchDog.saveAndResume(); if (alert) this.restartAlert(); this.serverProcess.kickAllPlayers("&aServer jest restartowany....");