2014-06-22 09:25:10 +00:00
|
|
|
From c850f78f39abb5228f1ed5d26567c35b5531635c Mon Sep 17 00:00:00 2001
|
2014-04-25 22:19:00 +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
|
|
|
|
index bcccaa9..ee8b6d6 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/UserCache.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/UserCache.java
|
|
|
|
@@ -206,7 +206,7 @@ public class UserCache {
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2014-06-22 09:25:10 +00:00
|
|
|
index b40801e..ab302c2 100644
|
2014-04-25 22:19:00 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
@@ -298,4 +298,10 @@ public class SpigotConfig
|
|
|
|
replaceCommands = new HashSet<String>( (List<String>) getList( "commands.replace-commands",
|
|
|
|
Arrays.asList( "setblock", "summon", "testforblock", "tellraw" ) ) );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static int userCacheCap;
|
|
|
|
+ private static void userCacheCap()
|
|
|
|
+ {
|
2014-05-23 22:07:20 +00:00
|
|
|
+ userCacheCap = getInt( "settings.user-cache-size", 1000 );
|
2014-04-25 22:19:00 +00:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|