mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 10:06:11 +03:00
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
--- ../src-base/minecraft/net/minecraft/server/management/PlayerProfileCache.java
|
|
+++ ../src-work/minecraft/net/minecraft/server/management/PlayerProfileCache.java
|
|
@@ -142,7 +142,7 @@
|
|
this.usernameToProfileEntryMap.put(gameProfile.getName().toLowerCase(Locale.ROOT), playerprofilecache$profileentry);
|
|
this.uuidToProfileEntryMap.put(uuid, playerprofilecache$profileentry);
|
|
this.gameProfiles.addFirst(gameProfile);
|
|
- this.save();
|
|
+ if(!org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) this.save(); // Spigot - skip saving if disabled
|
|
}
|
|
|
|
@Nullable
|
|
@@ -176,7 +176,7 @@
|
|
}
|
|
}
|
|
|
|
- this.save();
|
|
+ if(!org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) this.save(); // Spigot - skip saving if disabled
|
|
return playerprofilecache$profileentry == null ? null : playerprofilecache$profileentry.getGameProfile();
|
|
}
|
|
|
|
@@ -246,7 +246,7 @@
|
|
|
|
public void save()
|
|
{
|
|
- String s = this.gson.toJson((Object)this.getEntriesWithLimit(1000));
|
|
+ String s = this.gson.toJson((Object)this.getEntriesWithLimit(org.spigotmc.SpigotConfig.userCacheCap)); // Spigot
|
|
BufferedWriter bufferedwriter = null;
|
|
|
|
try
|