Simply you cant't or i don't know such a class would be fun if you could tho. or Did you whan't to place a block and then spawn a mob from that block when you walk on it?
You can't I believe I guess if you overide spawners so that your plugin handles their spawning then you could but that would be harder