Made Hello Player more extravagant
This commit is contained in:
parent
5e5544c462
commit
b18fff951f
1 changed files with 8 additions and 0 deletions
|
@ -25,12 +25,20 @@ public class HelloLocationPage extends Page{
|
||||||
public Response handlePage(HttpExchange exchange) {
|
public Response handlePage(HttpExchange exchange) {
|
||||||
//Returns the location of all players in table form
|
//Returns the location of all players in table form
|
||||||
String responseString = "<table>";
|
String responseString = "<table>";
|
||||||
|
|
||||||
|
responseString += "<tr><th>Player</th><th>Location</th></tr>";
|
||||||
for(Player player : plugin.getServer().getOnlinePlayers()){
|
for(Player player : plugin.getServer().getOnlinePlayers()){
|
||||||
|
//Creates new row: Player Name|Location
|
||||||
Location loc = player.getLocation();
|
Location loc = player.getLocation();
|
||||||
responseString += "<tr>";
|
responseString += "<tr>";
|
||||||
|
responseString += "<td>";
|
||||||
|
responseString += player.getPlayerListName();
|
||||||
|
responseString += "</td>";
|
||||||
|
responseString += "<td>";
|
||||||
responseString += loc.getBlockX() + " ";
|
responseString += loc.getBlockX() + " ";
|
||||||
responseString += loc.getBlockY() + " ";
|
responseString += loc.getBlockY() + " ";
|
||||||
responseString += loc.getBlockZ() + " ";
|
responseString += loc.getBlockZ() + " ";
|
||||||
|
responseString += "</td>";
|
||||||
responseString += "</tr>";
|
responseString += "</tr>";
|
||||||
}
|
}
|
||||||
responseString += "</table>";
|
responseString += "</table>";
|
||||||
|
|
Loading…
Reference in a new issue