Walk and death learderboard functionality

This commit is contained in:
Woosle Park 2019-03-28 00:22:08 -04:00
parent 47b37fbee3
commit b7839480c3

View File

@ -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;