Check that the event source is actually a DISPENSER before handling the
dispense event (prevents Java errors when someone is trying to use eg.
dropper as a cannon).