How did you find out about the Plugins[] element? I couldn't find it documented anywhere.
What I was doing before was something like:
Code:
function Turbine.Plugin:Unload()
-- save plugin state
end
I don't think you were actually clobbering anyone else's unload handlers. After a bit of testing with two plugins in the same apartment, one using Plugins[].Unload to assign its event handler and the other using Turbine.Plugin.Unload to assign its event handler it appears that the Turbine.Plugin object refers only to your plugin instance so each plugin gets a distinct instance of the Turbine.Plugin object. That is, assigning Turbine.Plugins.Unload in plugin "A" is the same as assigning Plugins["A"].Unload and will not overwrite the Unload handler for Plugins["B"]. Of course, this may be something that was changed with the latest updates and may have functioned differently before.
I really don't remember where I learned about the Plugins[] table. It may have been from one of the beta forum threads before Lua was released or it may have been from one of the plugins that I dissected while learning Lua myself. Now that I looked for it, I agree that it doesn't seem to be documented anywhere.