Configurable UserCache cap

By: drXor <mcyoungsota@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2014-04-25 18:17:30 -04:00
parent 05f3042755
commit 542b7a7eb1
2 changed files with 15 additions and 0 deletions

View File

@@ -36,3 +36,12 @@
Objects.requireNonNull(list);
optional.ifPresent(list::add);
@@ -261,7 +261,7 @@
JsonArray jsonarray = new JsonArray();
DateFormat dateformat = GameProfileCache.createDateFormat();
- this.getTopMRUProfiles(1000).forEach((usercache_usercacheentry) -> {
+ this.getTopMRUProfiles(org.spigotmc.SpigotConfig.userCacheCap).forEach((usercache_usercacheentry) -> { // Spigot
jsonarray.add(GameProfileCache.writeGameProfile(usercache_usercacheentry, dateformat));
});
String s = this.gson.toJson(jsonarray);