CommandHelper

CommandHelper

46.5k Downloads

Events for CH startup and CH shutdown

LadyCailinBot opened this issue ยท 3 comments

commented

CMDHELPER-2640 - Reported by jb_aero

@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

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

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

commented

Comment by Tom.Gebbett

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.