mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 18:46:43 +00:00
Walk and death learderboard functionality
This commit is contained in:
parent
47b37fbee3
commit
b7839480c3
@ -38,8 +38,10 @@ public class UserStatsHelper {
|
|||||||
|
|
||||||
for (Document dbUser : users.find().sort(orderBy).limit(n)) {
|
for (Document dbUser : users.find().sort(orderBy).limit(n)) {
|
||||||
User user = GameServer.INSTANCE.getGameUniverse().getUser((String) dbUser.get("username"));
|
User user = GameServer.INSTANCE.getGameUniverse().getUser((String) dbUser.get("username"));
|
||||||
//rows.add(new AbstractMap.SimpleEntry<>(user, user.getStats().getInt(statName)));
|
int val = 0;
|
||||||
rows.add(new AbstractMap.SimpleEntry<>(user, 999));
|
if(user.getStats().getInt(statName) > 0)
|
||||||
|
val = user.getStats().getInt(statName);
|
||||||
|
rows.add(new AbstractMap.SimpleEntry<>(user, val));
|
||||||
}
|
}
|
||||||
|
|
||||||
return rows;
|
return rows;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user