Made Hello Player more extravagant

This commit is contained in:
alisolarflare 2017-06-15 00:36:16 -06:00
parent 5e5544c462
commit b18fff951f

View file

@ -25,12 +25,20 @@ public class HelloLocationPage extends Page{
public Response handlePage(HttpExchange exchange) {
//Returns the location of all players in table form
String responseString = "<table>";
responseString += "<tr><th>Player</th><th>Location</th></tr>";
for(Player player : plugin.getServer().getOnlinePlayers()){
//Creates new row: Player Name|Location
Location loc = player.getLocation();
responseString += "<tr>";
responseString += "<td>";
responseString += player.getPlayerListName();
responseString += "</td>";
responseString += "<td>";
responseString += loc.getBlockX() + " ";
responseString += loc.getBlockY() + " ";
responseString += loc.getBlockZ() + " ";
responseString += "</td>";
responseString += "</tr>";
}
responseString += "</table>";