Since your plugin relies on the Menubar, if you are using it, you need to check if it is loaded before you can call methods of it:
Code: Select all
if ($this->isPluginLoaded('Flo\Menubar', 1.1)) ... then create the submenu and buttons
Code: Select all
$this->callPublicMethod('Flo\Menubar', 'initMenu', Icons128x128_1::Replay);
Code: Select all
$this->callPublicMethod('Flo\Menubar', 'addButton', 'Button Name', array($this, 'callbackName'));
You can add one parameter to the end, which is "true", to indicate that the button will only be shown to admins.
Finally a screenshot of how the final result can look like:

You can download the Menubar plugin here:
http://files.manialive.com/plugins/Menu ... _r1828.zip
Also find a download link on the manialive ManiaLink's plugin section!