I'm trying to make a plugin that bans players for a few hours, but I don't know the method in the Bukkit API that bans players. Edit: It's solved now, thanks Chiller!
Instead of doing that, you could loop in the syncing task that you can minus one for each int in a database so if someone was banned for 30 seconds, every tick would remove 1 (20 ticks per second, so it's 600 ticks). If int equals 0 then return and do not subtract.
Very inefficient and completely useless. I'd simply unban a player if the ban peroid expired when the player tries to log in.
Here's what you should really do: When you ban a player, save the date using JAVA's Date class and add a certain amount of time to it, for example 3 days. When he tries and log in, see if the current date has passed that date. If yes, unban him. If not, do nothing. EDIT by Silentspy: Please don't insult people in your post, it only make you look bad. we all try to be friendly to each other here.