Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PlayerBanEvent

Comments in 'Plugin Development' started by LDX, Apr 17, 2015.

  1. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,395
    Plugins:
    14
    While I realize that PlayerBanEvents aren't real, I would like to know how to program the equivalent of one. How can I tell when a player is banned or unbanned?
  2. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,128
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    He wants to know how to to get if player is banned or not.
  3. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,395
    Plugins:
    14
    That works for the ban command, but I also want to catch when a plugin calls the Player::setBanned() method.

    No, he had it right. You can check if a player is banned by calling the Player::isBanned() method.
  4. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,128
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    Then why ask if u know -,-
  5. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,395
    Plugins:
    14
    When, not if. ;^) #MajorLeagueEnglish
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,230
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PlayerKickEvent::getReason() or something like that.

Share This Page

Advertisement