Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Quick patch for a error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Sep 6, 2020
1 parent f6c5f0e commit c8ca346
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/Xera/Monitor/WebServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit c8ca346

Please sign in to comment.