From c8ca3469ada3dfeff7a01f3553cbab87970b7479 Mon Sep 17 00:00:00 2001 From: AlexProgrammerDE <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sun, 6 Sep 2020 08:44:51 +0200 Subject: [PATCH] Quick patch for a error --- src/main/java/Xera/Monitor/WebServer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/Xera/Monitor/WebServer.java b/src/main/java/Xera/Monitor/WebServer.java index 7281f02..d08b509 100644 --- a/src/main/java/Xera/Monitor/WebServer.java +++ b/src/main/java/Xera/Monitor/WebServer.java @@ -10,6 +10,7 @@ import java.io.IOException; import java.io.OutputStream; import java.net.InetSocketAddress; +import java.nio.charset.StandardCharsets; public class WebServer { XeraMonitor plugin; @@ -50,10 +51,10 @@ public void handle(HttpExchange t) { String response = contentBuilder.toString() .replaceAll("%server_tps%", String.valueOf(Bukkit.getServer().getTPS()[0])) .replaceAll("%server_playercount%", String.valueOf(Bukkit.getServer().getOnlinePlayers().size())) - .replaceAll("%server_playerlist%", String.valueOf(PlayerGeter.getPlayers())); + .replaceAll("%server_playerlist%", PlayerGeter.getPlayers()); try { - t.sendResponseHeaders(200, response.length()); + t.sendResponseHeaders(200, response.getBytes(StandardCharsets.UTF_8).length); } catch (IOException e) { e.printStackTrace(); }