Waiting time until unban

Discussion in 'Plugin Development' started by blok601, Jan 2, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    blok601

    Hello, I am working on a small plugin. I am trying to unban a player after a day. How would I do this?
     
  2. Offline

    timtower Moderator Moderator

    @blok601 Task that runs every minute or so, hashmap with times and uuid's to unban.
    If the saved time is bigger then the current time: unban, if not: do nothing.
    Means that the math is done when performing the ban, current systemtime + day
     
  3. Offline

    teej107

    timtower likes this.
  4. Offline

    timtower Moderator Moderator

  5. Offline

    teej107

    @timtower You don't need a task to check if a player's ban time is passed. With or without Bukkit's ban system.
     
  6. Offline

    timtower Moderator Moderator

    How do you do it without then?
     
  7. Offline

    teej107

    Check in the (Async)PlayerPreLoginEvent.
     
    WolfMage1 likes this.
  8. Offline

    timtower Moderator Moderator

    Good point, have to admit that.
     
Thread Status:
Not open for further replies.

Share This Page