geforkt von Mirrors/Paper
954c898c28
This was useful when plugins first started upgrading to uuid because each plugin would implement their own way for grabbing uuid's from mojang. Because none of them shared the result they would quickly hit the limits on the api causing the conversion to either fail or pause for long periods of time. The global api cache was a (very hacky) way to force all plugins to share a cache but caused a few issues with plugins that expected a full implementation of the HTTPURLConnection. Due to the fact that most servers/plugins have updated now it seems to be a good time to remove this as its usefulness mostly has expired.
61 Zeilen
2.7 KiB
Diff
61 Zeilen
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Fri, 8 Aug 2014 19:57:03 +1000
|
|
Subject: [PATCH] Plug WorldMap Memory Leak
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PersistentCollection.java b/src/main/java/net/minecraft/server/PersistentCollection.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/PersistentCollection.java
|
|
+++ b/src/main/java/net/minecraft/server/PersistentCollection.java
|
|
@@ -0,0 +0,0 @@ public class PersistentCollection {
|
|
|
|
private IDataManager b;
|
|
protected Map a = Maps.newHashMap();
|
|
- private List c = Lists.newArrayList();
|
|
+ public List c = Lists.newArrayList(); // Spigot
|
|
private Map d = Maps.newHashMap();
|
|
|
|
public PersistentCollection(IDataManager idatamanager) {
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
|
entity.die();
|
|
if (entity instanceof EntityHuman) {
|
|
this.players.remove(entity);
|
|
+ // Spigot start
|
|
+ for ( Object o : worldMaps.c )
|
|
+ {
|
|
+ if ( o instanceof WorldMap )
|
|
+ {
|
|
+ WorldMap map = (WorldMap) o;
|
|
+ map.i.remove( entity );
|
|
+ for ( Iterator<WorldMapHumanTracker> iter = (Iterator<WorldMapHumanTracker>) map.g.iterator(); iter.hasNext(); )
|
|
+ {
|
|
+ if ( iter.next().trackee == entity )
|
|
+ {
|
|
+ iter.remove();
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ // Spigot end
|
|
this.everyoneSleeping();
|
|
this.b(entity);
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldMap.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldMap.java
|
|
@@ -0,0 +0,0 @@ public class WorldMap extends PersistentBase {
|
|
public byte scale;
|
|
public byte[] colors = new byte[16384];
|
|
public List g = Lists.newArrayList();
|
|
- private Map i = Maps.newHashMap();
|
|
+ public Map i = Maps.newHashMap(); // Spigot
|
|
public Map decorations = Maps.newLinkedHashMap();
|
|
|
|
// CraftBukkit start
|
|
--
|