Maybe someone has an idea how I could create a coutentdown for a self-coded command. So that you can only execute a command every 5 minutes. Thank you in advance. It's about programming Minecraft plugins with Java via Eclipse
Save the execution time and check whether it was 5 minutes ago. Save again when running
I understand what you mean but I honestly don't know how I do it in Java
I would create an ArrayList with the player UUID and every time the command is executed the player will put the UUID into the array. Then I would create a delayed scheduler (still in the onCommand method) that counts the 5 minutes or so and at the end removes the UUID from the array. Now just test at the top of the "onCommand" whether the UUID is in the list and if so then "return" and possibly send a message.