[Dev] - Plugin dependencies
Posted: 16 Aug 2014, 06:15
Hi,
first of all, very good job, this server controller is amazing
, keep it up.
I've two question about plugin developpement.
First, i would like to check an other plugin dependency when my plugin is loaded.
I actually use this way but it doesn't works when ManiaControl is starting :
This exception is always thrown even when the Obstacle Plugin is enabled.
I think it doesn't works because my plugin is loaded before the Obstacle Plugin, if I enable my plugin manually after ManiaControl runtime, it's works well.
So, i there a better way to check others plugins dependencies ?
An other question now : i've registered an admin command in my plugin using this way :
But when i test this command, nothing happens and it doesn't appear in the command list (/helpall).
yet, my player login is registered as a SuperAdmin in the server.xml config. I missed something ?
the notice message shown below is displayed when ManiaControl start, maybe it can help you answer.
Thank you very much for your reply.
...and very sorry for the Dev mode env, I didn't know. Maybe you should describe that on this page http://www.maniacontrol.com/docs
first of all, very good job, this server controller is amazing

I've two question about plugin developpement.
First, i would like to check an other plugin dependency when my plugin is loaded.
I actually use this way but it doesn't works when ManiaControl is starting :
Code: Select all
public function load(ManiaControl $maniaControl) {
if(!$maniaControl->pluginManager->getPlugin('steeffeen\ObstaclePlugin')) {
$errormsg = 'This plugin requires "ObstaclePlugin" by Steeffeen.';
throw new \Exception($errormsg);
}
/* Blablabla */
}
I think it doesn't works because my plugin is loaded before the Obstacle Plugin, if I enable my plugin manually after ManiaControl runtime, it's works well.
So, i there a better way to check others plugins dependencies ?
An other question now : i've registered an admin command in my plugin using this way :
Code: Select all
$maniaControl->getCommandManager()->registerCommandListener(array('cmd', 'alias'), $this, 'commandMethod',true, 'Amaze command');
yet, my player login is registered as a SuperAdmin in the server.xml config. I missed something ?
the notice message shown below is displayed when ManiaControl start, maybe it can help you answer.
Code: Select all
Notice: Field 'nickname' doesn't have a default value in /home/action/workspace/obsmania/maniacontrol/core/Admin/AuthenticationManager.php on line 199
Thank you very much for your reply.
...and very sorry for the Dev mode env, I didn't know. Maybe you should describe that on this page http://www.maniacontrol.com/docs