Hand over the parameter player=name to userstats.xml to get the stats of

this player.
This commit is contained in:
Pascal Koenig
2011-08-28 00:28:49 +02:00
parent 8dda84b49b
commit f4b04c66af
2 changed files with 8 additions and 4 deletions

View File

@@ -20,15 +20,17 @@ For the stats of all known players:
http://server:port/userstats.xml
To fetch the stats of the given user:
http://server:port/userstats.xml?player=username
This will eventually be changed to a summarized view of all users stats as soon as the selection of users is implemented
The following commands are planned but not implemented yet:
To fetch the stats of the given user:
http://server:port/userstats.xml?id=username
to get data provided by the iConomy plugin:
http://server:port/money.xml
http://server:port/money.xml?id=username
http://server:port/money.xml?player=username

View File

@@ -78,7 +78,9 @@ public class XmlWorkerUserstats extends XmlWorker {
*/
for(String playerName : statsDS.getStats().keySet()){
root.appendChild(getPlayerElement(playerName, doc));
if (!parameters.containsKey("player") || (parameters.containsKey("player") && parameters.get("player").contains(playerName))){
root.appendChild(getPlayerElement(playerName, doc));
}
}
/*
* Hier endet der XML-Aufbau