Vazkii/Mod-Update-Manager — pull request #2 by ScottKillen (2012-07-28 22:46:26+00:00)
Title: Singleton Behavior

When multiple mods include this code, the mod_UpdateManager class is loaded for every mod that includes it. It is initialized, dumps the mod list and appears in the ModList gui for each instance of the code. I have included changes here to make the class behave consistent with a singleton UpdateManager.

This excellent mod really should be added to cpw/FML. Barring that, the code here should remove the duplicated behavior. I have tested this by implementing it in both the ScottKillen/Bunyan and ScottKllen/ExtrabiomesXL mods.

The attached code is compatible with other implementations of the 2.2 code. the Update Manager is no longer based on BaseMod and as a result loses some functionality. The client loses the hotkey and no longer appears in the FML ModList screen. With this code, the server command no longer works and the greeting appears multiply for each mod when an op logs on...so I have disabled it in my mods.

I really encourage you to submit this entire system as a change to cpw/FML...but, if not, I hope you can make use of these changes.