2015-07-27 12:20:54 +00:00
|
|
|
From 533edd1b196f90377cf3f6cd3285d105c0a93068 Mon Sep 17 00:00:00 2001
|
2014-07-21 20:46:54 +00:00
|
|
|
From: drXor <mcyoungsota@gmail.com>
|
|
|
|
Date: Fri, 25 Apr 2014 18:17:30 -0400
|
|
|
|
Subject: [PATCH] Configurable UserCache cap
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
|
2015-07-27 12:20:54 +00:00
|
|
|
index 846d7ca..8001b8a 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/UserCache.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/UserCache.java
|
2015-05-09 20:23:26 +00:00
|
|
|
@@ -208,7 +208,7 @@ public class UserCache {
|
2014-07-21 20:46:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void c() {
|
|
|
|
- String s = this.b.toJson(this.a(1000));
|
|
|
|
+ String s = this.b.toJson(this.a(org.spigotmc.SpigotConfig.userCacheCap));
|
|
|
|
BufferedWriter bufferedwriter = null;
|
|
|
|
|
|
|
|
try {
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
2015-05-25 19:09:58 +00:00
|
|
|
index 3a8734f..e88765b 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2015-05-25 19:09:58 +00:00
|
|
|
@@ -316,4 +316,10 @@ public class SpigotConfig
|
2014-07-21 20:46:54 +00:00
|
|
|
replaceCommands = new HashSet<String>( (List<String>) getList( "commands.replace-commands",
|
|
|
|
Arrays.asList( "setblock", "summon", "testforblock", "tellraw" ) ) );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static int userCacheCap;
|
|
|
|
+ private static void userCacheCap()
|
|
|
|
+ {
|
|
|
|
+ userCacheCap = getInt( "settings.user-cache-size", 1000 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-05-29 09:35:21 +00:00
|
|
|
2.1.4
|
2014-07-21 20:46:54 +00:00
|
|
|
|