How do i create a cooldown timer so it displays h/m/s. I have the cool down already setup but it keeps displaying 800 sec.
Put a player in a hashmap with UUID's and runnables, then run it every second and -1 every second. Code (Text): HashMap<UUID, BukkitRunnable> cooldown = new HashMap<>(UUID, BukkitRunnables);
A cooldown is correctly implemented by storing the player and the current time in a Map. You should not be using schedulers. Like I said above, you should have the current time + your cooldown in milliseconds saved in a Map with the player. You can subtract the time stored in the map from the current time, divide by 1000. That will give you the seconds. You can easily find how many hours, and minutes there are with a little math.
I know that i cannot be spoon fed the code but i have tried multiple things to try and get this to work but i still have no luck can someone please help out with the converting 1800 seconds to make it show 30:00 mins.