Ban

Raise

This Event is raised when an admin ban a player

Usage

Can be used to change Reason/Duration or even prevent the ban or store the ban inside a Database

BanEvent

EventArgsTypeDescription

Player

SynapsePlayer

The Player that is going to be banned

Allow

bool

If the Player can be banned

BanIssuer

SynapsePlayer

The Person who banns the Player

Reason

string

The reason for the Ban

Duration

long

The Duration of the Ban

GlobalBan

bool

If this is a Global Ban

public class BanEvent : PlayerInteractEvent
{
    public BanEvent(SynapsePlayer player, bool allow, SynapsePlayer banIssuer, string reason, long duration,
        bool global) : base(player, allow)
    {
        BanIssuer = banIssuer;
        Reason = reason;
        Duration = duration;
        GlobalBan = global;
    }

    public SynapsePlayer BanIssuer { get; }
    
    public string Reason { get; set; }
    
    public long Duration { get; set; }
    
    public bool GlobalBan { get; }
}

Last updated