mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 02:07:37 +01:00
542b7a7eb1
By: drXor <mcyoungsota@gmail.com>
48 lines
2.3 KiB
Diff
48 lines
2.3 KiB
Diff
--- a/net/minecraft/server/players/GameProfileCache.java
|
|
+++ b/net/minecraft/server/players/GameProfileCache.java
|
|
@@ -85,7 +85,7 @@
|
|
}
|
|
|
|
public void onProfileLookupFailed(String s1, Exception exception) {
|
|
- atomicreference.set((Object) null);
|
|
+ atomicreference.set(null); // CraftBukkit - decompile error
|
|
}
|
|
};
|
|
|
|
@@ -142,7 +142,7 @@
|
|
usercache_usercacheentry.setLastAccess(this.getNextOperation());
|
|
optional = Optional.of(usercache_usercacheentry.getProfile());
|
|
} else {
|
|
- optional = GameProfileCache.lookupGameProfile(this.profileRepository, s1);
|
|
+ optional = GameProfileCache.lookupGameProfile(this.profileRepository, name); // CraftBukkit - use correct case for offline players
|
|
if (optional.isPresent()) {
|
|
this.add((GameProfile) optional.get());
|
|
flag = false;
|
|
@@ -208,7 +208,7 @@
|
|
|
|
label54:
|
|
{
|
|
- ArrayList arraylist;
|
|
+ List<GameProfileCache.GameProfileInfo> arraylist; // CraftBukkit - decompile error
|
|
|
|
try {
|
|
JsonArray jsonarray = (JsonArray) this.gson.fromJson(bufferedreader, JsonArray.class);
|
|
@@ -217,7 +217,7 @@
|
|
DateFormat dateformat = GameProfileCache.createDateFormat();
|
|
|
|
jsonarray.forEach((jsonelement) -> {
|
|
- Optional optional = GameProfileCache.readGameProfile(jsonelement, dateformat);
|
|
+ Optional<GameProfileCache.GameProfileInfo> optional = GameProfileCache.readGameProfile(jsonelement, dateformat); // CraftBukkit - decompile error
|
|
|
|
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);
|