Remove some accidentally added duplicate patches, and finish implementing PluginManager.add_hook. Also, fix the HookType enum patch, as it caused errors before.