CommandHelper

CommandHelper

46.5k Downloads

Events for CH startup and CH shutdown

LadyCailin opened this issue ยท 3 comments

commented

CMDHELPER-2640 - Reported by jb_aero on 2013-04-12 04:28:19 UTC

@startup and @shutdown tags run when the compiler runs...

So I guess these need to be triggered from onEnable and onDisable.

commented

Comment by Tom.Gebbett on 2013-04-15 19:36:54 UTC

onEnable is the same as putting code in main.ms
an event for runtime unloading would be handy... when either commandhelper is disabled or is reloading scripts. You can work around this by adding code into certain command binds, but that is less neat.

commented

Comment by jb_aero on 2013-04-16 00:58:42 UTC

Well, unless CH disables itself on /reloadaliases, onEnable should only run once.

commented

Comment by Tom.Gebbett on 2013-04-16 01:02:58 UTC

yeah, that's a fair point. Not sure what i'd use that for that i couldn't do already, but it isn't the same as code in main.ms. Any additive feature is a good one.