1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Is there a way to check if a player has been banned before

Discussion in 'General discussion' started by rektpixel, Oct 14, 2017.

  1. rektpixel

    rektpixel Baby Zombie

    Messages:
    186
    As the title says, is there a way to do this? To see if a player has joined before is:
    PHP:
    if ($player->hasPlayedBefore() == true) {
    but yeah I wanna check if the player has been banned before, not sure how
     
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    PocketMine does not track ban history. You have to maintain your own ban log by listening to ban events (there is no ban event, so you have to rely on PlayerCommandPreprocessEvent/ServerCommandEvent or check ban status every PlayerQuitEvent/PlayerPreLoginEvent or synchronize the ban list periodically).
     
    HimbeersaftLP and rektpixel like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.