DispenserConnected
Skip to content
mnscript
DispenserConnected(Dispenser) 

Description ​

Invoked when a Dispenser peripheral is connected to the terminal.

Arguments ​

Dispenser - The Dispenser which was connected.

Example ​

msc
using Console;
using Event;
using Peripheral;

// Registers an event listener for when dispensers are connected.

function OnDispenserConnected(Dispenser dsp){
    Console.WriteLine("A dispenser was connected!");
}

Event.AddListener("DispenserConnected", "dispensers", "OnDispenserConnected");