-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMetaData.php
More file actions
41 lines (31 loc) · 1.03 KB
/
MetaData.php
File metadata and controls
41 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace ManiaLivePlugins\pluginAcme;
use ManiaLivePlugins\eXpansion\Core\types\config\types\TypeString;
/**
* Description of MetaData
*
* @author De Cramer Oliver
*/
class MetaData extends \ManiaLivePlugins\eXpansion\Core\types\config\MetaData
{
public function onBeginLoad()
{
parent::onBeginLoad();
$this->setName("eXpansion Acme");
$this->setDescription("A demo plugin to show dev's how to create plugins");
$this->setGroups(array('Demo'));
// Get configuration instance,
$config = Config::getInstance();
/* Create a new variable. "who" is the name of the variable in the config class, and the second parameter
* the name to display in the front.
*/
$var = new TypeString("who", "Who do we great hello to?", $config);
// Description of this variable. We use a dummy description.
$var->setDescription("Dummy description");
// Default value used to reset the setting.
$var->setDefaultValue('world');
// We register the variable to enable configuration in game.
$this->registerVariable($var);
}
}
?>