newLineChars = Arrays.asList('\n', '\r');
+
+ while(newLineChars.contains(log.charAt(log.length()-1)))
+ log = log.substring(0, log.length() - 1);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ if(log == null) {
+ Bukkit.getLogger().info(Internationalization.getPhrase("log-read-error"));
+ return;
+ }
+
+ wsServer.sendToClient(conn,
+ new ConsoleOutput(log)
+ );
+ }
+
+}
\ No newline at end of file
From b7e14789911e874fd524c9b2d585ac417cf14234 Mon Sep 17 00:00:00 2001
From: Carlos <28845529+mesacarlos@users.noreply.github.com>
Date: Sat, 22 Feb 2020 18:06:26 +0100
Subject: [PATCH 2/4] Implemented READLOGFILE client-side
---
client/index.html | 18 ++++++----
client/scripts/WebConsole.js | 4 +++
client/scripts/WebConsoleConnector.js | 1 +
client/scripts/WebConsoleJqueryHandler.js | 9 +++++
client/scripts/WebConsoleLanguage.js | 34 ++++---------------
client/scripts/WebConsoleManager.js | 7 ++++
.../scripts/WebConsolePersistenceManager.js | 4 ++-
7 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/client/index.html b/client/index.html
index 960e3c8..365ca94 100644
--- a/client/index.html
+++ b/client/index.html
@@ -230,6 +230,10 @@
+
+
+
+