Skip to content

Instantly share code, notes, and snippets.

@Tschrock
Last active August 29, 2015 14:04
Show Gist options
  • Save Tschrock/80fd9b8ed1e15adb6e12 to your computer and use it in GitHub Desktop.
Save Tschrock/80fd9b8ed1e15adb6e12 to your computer and use it in GitHub Desktop.
PocketMine Plugin Referance

Config files:

###Generic Config File###

  1. Make a config.yml file
  2. Put it in the /resources folder
  3. Add
$this->saveDefaultConfig();
$this->reloadConfig();

to onEnable()
4. Use $this->getConfig() to get the configuration.

###Custom Config Files:###

  1. Create a new config file with
$this->myCustomConfig = new Config($this->getDataFolder() . "nameOfTheFlie.yml", Config::YAML, array(
            "thing1" => "value1",
            "thing2" => "value2",
        ));
  1. Use $this->myCustomConfig to get the configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment