Tutorial Request - Banning Plugin

Discussion in 'Plugin Development' started by uyscutix, Feb 25, 2017.

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

    uyscutix

    Can someone do a tutorial how to make an advanced banning plugin? I can't find any bukkit plugin tutorials on YouTube how to make an advanced banning plugin.

    All I know is it is probably an auto-kick PlayerLoginEvent with a custom message displayed, but I'd like to know how to make the BanList (yml file) or a way to save the bans so the PlayerLoginEvent would have an IF statement where it'll check to see if a player's name or IP is on the BanList (file) then do the stuff it needs to do (which is auto kick).
     
  2. Offline

    Zombie_Striker

    There is your first problem. Never search for youtube tutorials first. Look for written tutorials first.

    It actually quite simple to make a banning plugin:
    1. Create a custom Yaml. The wiki has a section all about this.
    2. On PlayerJoinEvent
    3. If the player is in the config (or if you want to be more advanced) if the time they are no longer banned has passed
    4. Player.kick("Reason")
     
Thread Status:
Not open for further replies.

Share This Page