/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/web/StatusListener.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/web/StatusListener.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2427 by torben, Fri Jan 2 09:57:38 2015 UTC revision 2428 by torben, Mon Mar 9 11:56:37 2015 UTC
# Line 45  public class StatusListener implements H Line 45  public class StatusListener implements H
45                    
46          @Override          @Override
47          public void handle(HttpExchange http) throws IOException {                        public void handle(HttpExchange http) throws IOException {              
 /*              if(!event.path[0].equalsIgnoreCase("webstatus")) {  
                         return;  
                 }*/  
48    
49                  String xml;                  String xml;
50    
# Line 63  public class StatusListener implements H Line 60  public class StatusListener implements H
60                  }                  }
61                                                    
62    
 /*              event.setResponse(xml);  
                 event.setActionTaken(true);*/  
63                  byte bytes[] = xml.getBytes();                  byte bytes[] = xml.getBytes();
64                  http.getResponseHeaders().add("Content-Type", "text/plain");                  http.getResponseHeaders().add("Content-Type", "text/plain");
65                  http.sendResponseHeaders(HttpURLConnection.HTTP_OK, bytes.length );                  http.sendResponseHeaders(HttpURLConnection.HTTP_OK, bytes.length );
# Line 103  public class StatusListener implements H Line 98  public class StatusListener implements H
98    
99                          sb.append("<player>\n");                          sb.append("<player>\n");
100                          sb.append("<name>" + player.getName() + "</name>\n" );                          sb.append("<name>" + player.getName() + "</name>\n" );
101                            sb.append("<uuid>" + player.getUniqueId() + "</uuid>\n" );
102    
103                          sb.append("<firstseen>" + formatTime(first) + "</firstseen>\n");                          sb.append("<firstseen>" + formatTime(first) + "</firstseen>\n");
104                          sb.append("<lastseen>" + formatTime(last) + "</lastseen>\n");                          sb.append("<lastseen>" + formatTime(last) + "</lastseen>\n");

Legend:
Removed from v.2427  
changed lines
  Added in v.2428

  ViewVC Help
Powered by ViewVC 1.1.20