[Dev] - Plugin dependencies

ManiaControl, the completely new designed and easy to use controller managing all your Maniaplanet server.

Moderators: Wabbitface, Jocy, steeffeen, NADEO

Post Reply
marlburrow
Posts: 9
Joined: 10 Nov 2013, 19:16

[Dev] - Plugin dependencies

Post by marlburrow »

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 :

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 */
}
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 :

Code: Select all

$maniaControl->getCommandManager()->registerCommandListener(array('cmd', 'alias'), $this, 'commandMethod',true, 'Amaze command');
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.

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
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: [Dev] - Plugin dependencies

Post by steeffeen »

hey!
thanks for the kind words :)

yeah the docs page is absolutely outdated, we know that but we didn't find the time to fix it because there have been other priorities so far
i also forget the dev mode sometimes but developing without it the whole time creates maaaany error reports on the website ^^

there is no support for plugin loading order but imo you shouldn't need that
i was always annoyed how like 90% of all plugins of the other controllers have had some kind of dependencies to other plugins, which is why we don't support that natively
if you need another plugin for doing stuff, just don't do it as long it's unavailable and print an error message
i can't think of something that would require to stop your plugin
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    marlburrow
    Posts: 9
    Joined: 10 Nov 2013, 19:16

    Re: [Dev] - Plugin dependencies

    Post by marlburrow »

    Thank you for the answer Steeffeen,

    Last question, how can i submit my plugin when it's done ?

    Thank you
    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2463
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: [Dev] - Plugin dependencies

    Post by steeffeen »

    check out http://maniacontrol.com -> User Area -> My Plugins
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks
      Post Reply

      Return to “ManiaControl”

      Who is online

      Users browsing this forum: No registered users and 2 guests