VolmitSoftware / Adapt

Adapt Vanilla Gameplay with better skills and implementations than anywhere else!
https://docs.volmit.com/adapt
GNU General Public License v3.0
84 stars 56 forks source link

Optimize Map usage for cooldowns #483

Closed ODAKAB closed 2 months ago

ODAKAB commented 2 months ago

WIP: I want to extend this to a cooldown manager which is simply an utility class which creates and gives cooldown lists, then manages querying to free outdated entries. But i need to ask questions and learn how Adapt and Spigot works if there is concurrency to handle.

Or another easy tweak can be using UUIDs instead Player objects as key, so GC can clean unnecessary Player objects from memory so reduce size of potential memory leak.