fix memory leak (#3631)

on servers with lots of spawner farms this metadata won't get GC'd unless removed, line 436 its added but never removed as far as I can tell
This commit is contained in:
Josh 2018-12-06 22:05:55 -05:00 committed by t00thpick1
parent 71c72045b9
commit 605535ed60

View File

@ -395,6 +395,10 @@ public class EntityListener implements Listener {
entity.setCustomNameVisible(entity.getMetadata(mcMMO.customVisibleKey).get(0).asBoolean());
entity.removeMetadata(mcMMO.customVisibleKey, plugin);
}
if (entity.hasMetadata(mcMMO.entityMetadataKey)) {
entity.removeMetadata(mcMMO.entityMetadataKey, plugin);
}
}
/**