Ban Plugin - Kick message isnt right

Discussion in 'Plugin Development' started by LukasXtra, Sep 15, 2014.

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

    LukasXtra

    I wrote a ban plugin. It is working fine. But when someone who is already banned join the game and he got kicked, the guy dont get the right kick message he gets this one: http://puu.sh/bA1lM/4234348618.png I want to fix it by run the task 5 ticks later or something else. How can i do this? Here is my joinListener: http://hastebin.com/kuciziguca.avrasm
    Thanks for ur help :)
     
  2. Offline

    Nateb1121

    Can we see your code for the kicking and kick message?
     
  3. Offline

    LukasXtra

  4. Offline

    Jalau

  5. Offline

    Konato_K

  6. Offline

    LukasXtra

    I tested this but it doesnt change it :/

    can you explain me how i can kick the person after 5 ticks? Its called RunTaskLater or sth like that ^^ Please help

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  7. Offline

    Konato_K

    If you only want to kick the person after they joined then listen for PlayerJoinEvent, get the data and kick them with an scheduler, if you don't know what that is you should probably try to read some info that already exists before coming to ask here, please read this http://wiki.bukkit.org/Scheduler_Programming
    In my opinion you don't need to wait for the player to login, you can listen of AsyncPreLogin and query your database or whatever you use to know if the the player is banned or not, as you can see here http://jd.bukkit.org/rb/apidocs/org/bukkit/event/player/AsyncPlayerPreLoginEvent.html the event has a disallow method that includes the reason and the message they get.
     
  8. Offline

    macboinc

    I think the Buy-An-Unban is against the EULA update.
     
  9. Offline

    Konato_K

    macboinc Sounds like pay-to-play to me, and the EULA says that is allowed.
     
Thread Status:
Not open for further replies.

Share This Page