16 |
/*import org.kokakiwi.apicraft.events.ApiEvent; |
/*import org.kokakiwi.apicraft.events.ApiEvent; |
17 |
import org.kokakiwi.apicraft.events.ApiListener;*/ |
import org.kokakiwi.apicraft.events.ApiListener;*/ |
18 |
import de.codeinfection.quickwango.ApiBukkit.ApiBukkit; |
import de.codeinfection.quickwango.ApiBukkit.ApiBukkit; |
19 |
import de.codeinfection.quickwango.ApiBukkit.ApiRequestAction; |
import de.codeinfection.quickwango.ApiBukkit.ApiServer.*; |
|
import de.codeinfection.quickwango.ApiBukkit.ApiRequestException; |
|
|
import de.codeinfection.quickwango.ApiBukkit.Net.Parameters; |
|
|
import de.codeinfection.quickwango.ApiBukkit.ApiRequestController; |
|
20 |
|
|
21 |
public class StatusListener extends ApiRequestController { |
|
22 |
|
@Controller( name = "webstatus", authenticate = false, serializer = "plain" ) |
23 |
|
public class StatusListener extends ApiController { |
24 |
|
|
25 |
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
26 |
|
|
32 |
String cachedXml = ""; |
String cachedXml = ""; |
33 |
|
|
34 |
public StatusListener(Plugin plugin, Server server, Configuration loginConfig, Configuration homeConfig) { |
public StatusListener(Plugin plugin, Server server, Configuration loginConfig, Configuration homeConfig) { |
35 |
super(plugin,true); |
|
36 |
|
super( new de.codeinfection.quickwango.Abstraction.Implementations.Bukkit.BukkitPlugin(plugin) ); |
37 |
|
|
38 |
this.server = server; |
this.server = server; |
39 |
this.loginConfig = loginConfig; |
this.loginConfig = loginConfig; |
49 |
} |
} |
50 |
|
|
51 |
@Override |
@Override |
52 |
public Object defaultAction(String action, Parameters params, Server server) throws ApiRequestException { |
public void defaultAction(String action, ApiRequest request, ApiResponse response) { |
53 |
/* if(!event.path[0].equalsIgnoreCase("webstatus")) { |
/* if(!event.path[0].equalsIgnoreCase("webstatus")) { |
54 |
return; |
return; |
55 |
}*/ |
}*/ |
71 |
/* event.setResponse(xml); |
/* event.setResponse(xml); |
72 |
event.setActionTaken(true);*/ |
event.setActionTaken(true);*/ |
73 |
|
|
74 |
return xml; |
response.setContent( xml); |
75 |
} |
} |
76 |
|
|
77 |
private String buildXML() { |
private String buildXML() { |