DoorInteract

Raise

This Event is raised when a Player tries to open a Door

Usage

Can be used to create Custom Permissions to open the Door.

Can also be used as an "interface" like calling a Custom Elevator

DoorInteractEvent

EventArgsTypeDescription

Player

SynapsePlayer

The Player who opens the Door

Allow

bool

If the Player is allowed to open the Door

Door

SynapseDoor

The Door which the Player tries to open

LockBypassRejected

bool

This is true when the Player isn't allowed to open the door (Allow = false) due to the fact that this door is locked and he can't bypass the lock (BypassMode/Nuke)

public class DoorInteractEvent : PlayerInteractEvent
{
    public SynapseDoor Door { get; }
    
    public bool LockBypassRejected { get; }

    public DoorInteractEvent(SynapsePlayer player, bool allow, SynapseDoor door, bool lockBypass) : base(player, allow)
    {
        Door = door;
        LockBypassRejected = lockBypass;
    }
}

Last updated