mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
70ce6ce831
This makes it easier for downstream projects (forks) to replace the version fetching system with their own. It is as simple as implementing an interface and overriding the default implementation of org.bukkit.UnsafeValues#getVersionFetcher() It also makes it easier for us to organize things like the version history feature. Lastly I have updated the paper implementation to check against the site API rather than against jenkins.
24 lines
962 B
Diff
24 lines
962 B
Diff
From 3232ce9d80f024b54c48fe2b1805bdf2e20acc59 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Sun, 12 May 2019 19:25:53 -0700
|
|
Subject: [PATCH] Fix MC-151674 Close RegionFiles when they get evicted from
|
|
cache
|
|
|
|
https://bugs.mojang.com/browse/MC-151674
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
|
index 844f491c7..137183481 100644
|
|
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
|
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
|
@@ -56,7 +56,7 @@ public abstract class RegionFileCache implements AutoCloseable {
|
|
return regionfile;
|
|
} else {
|
|
if (this.cache.size() >= PaperConfig.regionFileCacheSize) {
|
|
- this.cache.removeLast();
|
|
+ this.cache.removeLast().close(); // Paper - MC-151674
|
|
}
|
|
|
|
if (!this.a.exists()) {
|
|
--
|
|
2.21.0
|
|
|