forked from External/mage
* User list added info about games and tournaments. Fixed a logging NPE.
This commit is contained in:
parent
663c31cec6
commit
6c54812068
4 changed files with 25 additions and 8 deletions
|
|
@ -305,4 +305,21 @@ public class User {
|
|||
return this.userData;
|
||||
}
|
||||
|
||||
public String getUserInfo() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (gameSessions.size() > 0) {
|
||||
sb.append("G: ").append(gameSessions.size());
|
||||
}
|
||||
if (tournamentSessions.size() > 0) {
|
||||
if (sb.length() > 0) {
|
||||
sb.append(" ");
|
||||
}
|
||||
sb.append("T: ").append(tournamentSessions.size());
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
sb.insert(0, " - [");
|
||||
sb.append("]");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue