Ad hoc command inside plugin

Hi,

can i use ad hoc command inside a plugin?? Sorry if is a stupid question but i don´t find the answer.

Thak you