Addon Manager

With the plugin system you can code your own addon management system. The methods required for this system can be found in the addon skeleton located at includes\classes\plugins\skeletons\addons.php

We have also included the Bukget addon manager as a working example, you can find this code in includes\plugins\bukget\bukget.php.

Events

ListAddons

Return an array of addons associated with this plugin.

This is passed the game id as a variable

AddGameAddon

Save an addon associated with this plugin

This is passed an array containing the following variables

  • All variables from Games::AddGameAddon (Games API)
  • Use $_POST/$_GET if you need to access custom variables

EditGameAddon

Save an addon associated with this plugin

This is passed an array containing the following variables

  • All variables from Games::EditGameAddon (Games API)
  • Use $_POST/$_GET if you need to access custom variables

DeleteAddon

Delete an addon associated with this plugin

This is passed an array containing the following variables

  • gid - The game's ID
  • addonid - The addon's ID

InstallAddon

Install an addon

This is passed an array containing the following variables

  • ugid - The user's game ID
  • addonid - The addon's ID

This should return an array containing “error” ⇒ 0 if successful.

displayaddons

Displays the list of addons for the game server

This is passed the game id as a variable

displayaddonmanager

Displays the addon manager for admins

This is passed the game id as a variable