On_PlayerBan

Feb 22, 2018
On_PlayerBan
  • Method:
    On_PlayerBan

    Description:
    Runs when a Player gets banned by Fougerite Ban Methods.

    Argument(s):
    BanEvent be

    Examples:

    BAN TYPES:

    Code (C#):
    public enum BanType
        {
            Player,
            IDandIP,
            OnlyID,
            OnlyIP
        }


    JavaScript:

    Code (Javascript):

    function On_PlayerBan(BanEvent)
    {
     
    }
    Python:
    Code (Python):
    def On_PlayerBan(self, BanEvent):
        if str(BanEvent.BanType) == "Player": # Check if an online Player was banned. (Convert the enum to string)
             BanEvent.Cancel()
     
    Lua:
    Code (Lua):
    function On_PlayerBan(BanEvent)
     
    end