I'm creating a mini RPG and not 100% where it is going to go. Just making things as I think of them currently. Lately I've been thinking about how to implement cooldowns for spells. The spells are created inside XML which I parse and store once the game starts up.
Normally if there is a small list I would make variables and variable timers for each but this would be a mess when I expand to having more spells.
My other option that I have been thinking about is using a ConcurrentHashMap or ConcurrentSkipListMap then when a spell is cast, put the name of the spell inside the map and schedule a runnable that would remove the name after the specific cooldown time.
Would my second option be the best way to go about it or is there another solution?

