mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
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:
parent
71c72045b9
commit
605535ed60
@ -395,6 +395,10 @@ public class EntityListener implements Listener {
|
|||||||
entity.setCustomNameVisible(entity.getMetadata(mcMMO.customVisibleKey).get(0).asBoolean());
|
entity.setCustomNameVisible(entity.getMetadata(mcMMO.customVisibleKey).get(0).asBoolean());
|
||||||
entity.removeMetadata(mcMMO.customVisibleKey, plugin);
|
entity.removeMetadata(mcMMO.customVisibleKey, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entity.hasMetadata(mcMMO.entityMetadataKey)) {
|
||||||
|
entity.removeMetadata(mcMMO.entityMetadataKey, plugin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user