plugin interface id
This commit is contained in:
parent
53f568847f
commit
88f5239965
@ -22,6 +22,13 @@ interface Plugin {
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl);
|
||||
|
||||
/**
|
||||
* Get plugin id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public static function getId();
|
||||
|
||||
/**
|
||||
* Get Plugin Name
|
||||
*
|
||||
|
@ -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()
|
||||
|
@ -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.';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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.";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user