Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Config editing and saving from commands

Comments in 'Plugin Development' started by Comedyman937, Mar 8, 2014.

  1. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    386
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    Ok I need a little help with setting up a way to allow OPs that are on a server to be able to edit the config while they are in the game. Right now here is my code:
    PHP:
    $this->config = new Config($this->api->plugin->configPath($this)."config.yml."CONFIG_YAML, array(
    'enableConf' => false,
    'spawnWorld' => 'world',
    'X' => 0,
    'Y' => 0,
    'Z' => 0,
    ));
    What i want is for the issuer to have their position collected and then the X, Y, and Z cords to be added to the correct part on the config when they type a certain command.
    Any help will be appreciated!

    Thanks in advance!
  2. SuperChipsLP
    Offline

    SuperChipsLP Active Member Plugin Developer

    Joined:
    Sep 15, 2013
    Posts:
    204
    Plugins:
    5
    Minecraft User:
    Redmol
    It's basically that. Just run that from the command handler...

Share This Page

Advertisement