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

Solved command access through configs

Comments in 'Plugin Development' started by zombie_Power, Oct 30, 2015.

  1. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    Greetings,

    I am working on a plugin (public), and a little stuck with an issue.
    My issue: I am unsure, that how can I access the command through the configs.yml, for example, if the person types in /kill in the configs.yml, the specific command will be used.

    My concept.
    PHP:
     if($cmd[0] === $this->configs['command']){
    My aim is that the config user can add multiple commands into the configs.

    Any help appreciated :D
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    $this->getServer()->dispatchCommand($sender, $this->getConfig()->getNested("path.to.your.config.value"))
  3. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV

Share This Page

Advertisement