mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
e02c239421
As requested here: http://www.spigotmc.org/threads/specify-location-of-spigot-yml.67747/
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From 083b5e02fc877acd03637dab3da618a64b53ba64 Mon Sep 17 00:00:00 2001
|
|
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 021853e..31b4e81 100644
|
|
--- a/src/main/java/net/minecraft/server/UserCache.java
|
|
+++ b/src/main/java/net/minecraft/server/UserCache.java
|
|
@@ -208,7 +208,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
|
|
index 3a8734f..e88765b 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@@ -316,4 +316,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()
|
|
+ {
|
|
+ userCacheCap = getInt( "settings.user-cache-size", 1000 );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.0.msysgit.0
|
|
|