Plugin Kill itself?

Is there a way for a plugin to unload itself?

Yes, by using a server command
For a CovalencePlugin  , this command will work ( replace PluginName with your plungin name )
covalence.Server.Command("oxide.unload", new object[] { "PluginName" });

Iq21dlQIlYnlQTl.jpg Lorenzo

Yes, by using a server command
For a CovalencePlugin  , this command will work ( replace PluginName with your plungin name )
covalence.Server.Command("oxide.unload", new object[] { "PluginName" });

Though that should not be done generally in public plugins, rather defaults be used and messages shown.
yRpyKnceqFmEVhT.png Wulf
Though that should not be done generally in public plugins, rather defaults be used and messages shown.

Are you talking about the covalence.Server.Command usage in general , or the "oxide.unload" call ?

The only time i saw that plugin unload code is in plugin EventManager, after checking if a plugin dependency is missing
and i don’t know why he did not just use the // Requires:

I am a bit curious why the OP would need to unload is plugin, rather than just unsubscribe hooks or other methods to disable the plugin.

Iq21dlQIlYnlQTl.jpg Lorenzo

Are you talking about the covalence.Server.Command usage in general , or the "oxide.unload" call ?

The only time i saw that plugin unload code is in plugin EventManager, after checking if a plugin dependency is missing
and i don’t know why he did not just use the // Requires:

I am a bit curious why the OP would need to unload is plugin, rather than just unsubscribe hooks or other methods to disable the plugin.

Any method for a plugin to unload should generally not be used, as it doesn't really provide feedback for the user and anything they expect to be there doesn't work which leads to support issues.

Yeah, Likely I'll just bypass the function of the plugin if a known conflict is found and drop a message in the console.