TempBan Plugin

Discussion in 'Plugin Development' started by GodzillaFlame42, Sep 11, 2016.

Thread Status:
Not open for further replies.
  1. How would i make a temp ban plugin and where do i start?
     
  2. Online

    timtower Administrator Administrator Moderator

  3. @GodzillaFlame42 I actually just got familiar with temp banning, but it's using Bukkit's built in feature.

    When banning the Player, save the System.currentTimeMillis in a config file. System.currentTimeMillis is the time since computers started counting, so it will run even when your server is offline.

    What to do is, kick he Player before saving the System.currentTimeMillis in the config, next do a Playerlogin event and check if the System.currentTimeMillis is more than the old one plus your ban time in milliseconds.

    Sorry I'm not good at all at explaining things, hope i could help though.
     
  4. Offline

    Zombie_Striker

    @Mindlessmink
    That is good if you want to build a custom tempban feature. If you want to use bukkit's pre-built ban method (and as such only need to have one line for this feature), use what @timtower suggested.
     
Thread Status:
Not open for further replies.

Share This Page