diff --git a/application/core/Plugins/Plugin.php b/application/core/Plugins/Plugin.php index 8734f0f4..ae276a2b 100644 --- a/application/core/Plugins/Plugin.php +++ b/application/core/Plugins/Plugin.php @@ -22,6 +22,13 @@ interface Plugin { */ public function __construct(ManiaControl $maniaControl); + /** + * Get plugin id + * + * @return int + */ + public static function getId(); + /** * Get Plugin Name * diff --git a/application/plugins/Chatlog.php b/application/plugins/Chatlog.php index dfc97e16..f5be13ea 100644 --- a/application/plugins/Chatlog.php +++ b/application/plugins/Chatlog.php @@ -14,7 +14,8 @@ class ChatlogPlugin implements CallbackListener, Plugin { /** * Constants */ - const VERSION = 1.0; + const ID = 1; + const VERSION = 0.1; const SETTING_FOLDERNAME = 'Log-Folder Name'; const SETTING_FILENAME = 'Log-File Name'; const SETTING_USEPID = 'Use Process-Id for File Name'; @@ -71,6 +72,14 @@ class ChatlogPlugin implements CallbackListener, Plugin { 'handlePlayerChatCallback'); } + /** + * + * @see \ManiaControl\Plugins\Plugin::getId() + */ + public static function getId() { + return self::ID; + } + /** * * @see \ManiaControl\Plugins\Plugin::getName() diff --git a/application/plugins/Donations.php b/application/plugins/Donations.php index c5fb67e4..45f1ee5e 100644 --- a/application/plugins/Donations.php +++ b/application/plugins/Donations.php @@ -16,7 +16,8 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { /** * Constants */ - const VERSION = 1.0; + const ID = 3; + const VERSION = 0.1; const SETTING_ANNOUNCE_SERVERDONATION = 'Enable Server-Donation Announcements'; /** @@ -41,12 +42,20 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { $this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_BILLUPDATED, $this, 'handleBillUpdated'); } + /** + * + * @see \ManiaControl\Plugins\Plugin::getId() + */ + public static function getId() { + return self::ID; + } + /** * * @see \ManiaControl\Plugins\Plugin::getName() */ public static function getName() { - return 'Donation Plugin'; + return 'Donations Plugin'; } /** @@ -70,7 +79,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { * @see \ManiaControl\Plugins\Plugin::getDescription() */ public static function getDescription() { - return 'DonationPlugin commands like /donate, /pay and /getplanets and a donation widget.'; + return 'Plugin offering commands like /donate, /pay and /getplanets and a donation widget.'; } /** diff --git a/application/plugins/Endurance.php b/application/plugins/Endurance.php index 308e0732..615a3902 100644 --- a/application/plugins/Endurance.php +++ b/application/plugins/Endurance.php @@ -13,7 +13,8 @@ class EndurancePlugin implements CallbackListener, Plugin { /** * Constants */ - const VERSION = 1.0; + const ID = 4; + const VERSION = 0.1; const CB_CHECKPOINT = 'Endurance.Checkpoint'; /** @@ -36,6 +37,14 @@ class EndurancePlugin implements CallbackListener, Plugin { $this->maniaControl->callbackManager->registerScriptCallbackListener(self::CB_CHECKPOINT, $this, 'callback_Checkpoint'); } + + /** + * + * @see \ManiaControl\Plugins\Plugin::getId() + */ + public static function getId() { + return self::ID; + } /** * * @see \ManiaControl\Plugins\Plugin::getName() diff --git a/application/plugins/Karma.php b/application/plugins/Karma.php index a9838446..0a06dfff 100644 --- a/application/plugins/Karma.php +++ b/application/plugins/Karma.php @@ -23,7 +23,8 @@ class KarmaPlugin implements CallbackListener, Plugin { /** * Constants */ - const VERSION = 1.0; + const ID = 5; + const VERSION = 0.1; const MLID_KARMA = 'KarmaPlugin.MLID'; const TABLE_KARMA = 'mc_karma'; const SETTING_AVAILABLE_VOTES = 'Available Votes (X-Y: Comma separated)'; @@ -75,6 +76,14 @@ class KarmaPlugin implements CallbackListener, Plugin { $this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERCHAT, $this, 'handlePlayerChat'); } + + /** + * + * @see \ManiaControl\Plugins\Plugin::getId() + */ + public static function getId() { + return self::ID; + } /** * * @see \ManiaControl\Plugins\Plugin::getName() diff --git a/application/plugins/LocalRecords.php b/application/plugins/LocalRecords.php index b0df8964..28dae9aa 100644 --- a/application/plugins/LocalRecords.php +++ b/application/plugins/LocalRecords.php @@ -24,7 +24,8 @@ class LocalRecordsPlugin implements CallbackListener, Plugin { /** * Constants */ - const VERSION = 1.0; + const ID = 6; + const VERSION = 0.1; const MLID_RECORDS = 'ml_local_records'; const TABLE_RECORDS = 'mc_localrecords'; const SETTING_WIDGET_TITLE = 'Widget Title'; @@ -84,6 +85,14 @@ class LocalRecordsPlugin implements CallbackListener, Plugin { } } + /** + * + * @see \ManiaControl\Plugins\Plugin::getId() + */ + public static function getId() { + return self::ID; + } + /** * * @see \ManiaControl\Plugins\Plugin::getName() diff --git a/application/plugins/Obstacle.php b/application/plugins/Obstacle.php index 73017b74..5b60be64 100644 --- a/application/plugins/Obstacle.php +++ b/application/plugins/Obstacle.php @@ -16,7 +16,8 @@ class ObstaclePlugin implements CallbackListener, CommandListener, Plugin { /** * Constants */ - const VERSION = 1.0; + const ID = 7; + const VERSION = 0.1; const CB_JUMPTO = 'Obstacle.JumpTo'; const SCB_ONFINISH = 'OnFinish'; const SCB_ONCHECKPOINT = 'OnCheckpoint'; @@ -40,6 +41,14 @@ class ObstaclePlugin implements CallbackListener, CommandListener, Plugin { $this->maniaControl->callbackManager->registerScriptCallbackListener(self::SCB_ONCHECKPOINT, $this, 'callback_OnCheckpoint'); } + + /** + * + * @see \ManiaControl\Plugins\Plugin::getId() + */ + public static function getId() { + return self::ID; + } /** * * @see \ManiaControl\Plugins\Plugin::getName() @@ -69,7 +78,7 @@ class ObstaclePlugin implements CallbackListener, CommandListener, Plugin { * @see \ManiaControl\Plugins\Plugin::getDescription() */ public static function getDescription() { - return 'Plugin offering various Commands for the ShootMania Obstacle Game Mode.'; + return "Plugin offering various Commands for the ShootMania 'Obstacle' Game Mode by steeffeen."; } /**