Cancel a command before it's processed?

Sponge API 4.x.x

I’m looking to create a plugin that would allow me to make certain commands console only.

Similar to how NoCheatPlus on bukkit allows you to blacklist commands as console only: http://i.imgur.com/SZqsAlc.png1

There doesn’t seem to be an event that allows me to cancel a command prior to its execution, only after. Is there a way to make this happen?

SendCommandEvent is the event you need. It is called before the execution of the command.

Does this event has a way to retrieve the CommandSource that initiated the command ?

I believe it’s event.getCause().last(CommandSource.class).get().

Thanks for your answer !