BlackBeltPanda / Transport-Pipes

Buildcraft without mods! This is a fork of the original Transport-Pipes plugin featuring support for newer versions of Spigot, many bug fixes, performance improvements, and end-user enhancements.
https://www.spigotmc.org/resources/transport-pipes.20873/
MIT License
39 stars 10 forks source link

Fix player memory leak and tpipes tps #36

Closed ChanceSD closed 1 year ago

ChanceSD commented 1 year ago

This fixes a memory leak with Player instances being left behind after a player leaves. When a player quits the server it was clearing their set of ducts but it was leaving the player key in the map, with no values associated. Now it should remove their entire entry. I also changed the /tpipes tps command a bit, before it would always show 0 items, now it shows how many items are currently flowing.

Edit: There might be another similar issue here since that map is also never cleared. I will need to run my server for a longer time to check if there's more Player instances left behind.

Edit2: Yes, it was leaking there as well, I made it remove that entry on quit, everything seems to work well now. If you need me to change anything let me know.

BlackBeltPanda commented 1 year ago

Hey, thanks a lot for contributing! Looks good except for the one thing I pointed out. =)