I think spellcasting is a protected function, so I dont think that code will work