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

Solved Config problem

Comments in 'Plugin Development' started by MineBuilderFR, Dec 16, 2015.

  1. MineBuilderFR
    Offline

    MineBuilderFR Active Member

    Joined:
    Mar 14, 2015
    Posts:
    56
    Minecraft User:
    MineBuilderFR
    Why this- doesn't work. (Config work and i have register event config ) , I use 2 plugins : 1 For set information in config , 1 For send information in other plugins .

    Problem: Plugins don't set config informations :/


    PHP:
            $this->enchant $this->getServer()->getPluginManager()->getPlugin($plug);
            
    $this->enchant->onEnchant();
    PHP:
        public function onEnchant(){
           
    $this->onEnchant = new Config($this->getDataFolder()."enchant.yml",Config::YAML);
        
    $this->onEnchant->set("enabledEnchant""yes");
        
    $this->onEnchant->save();


        return 
    true;
        }
  2. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    this code should work.
  3. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Are you
    PHP:
     use 
    'ing the necessary files?
  4. MineBuilderFR
    Offline

    MineBuilderFR Active Member

    Joined:
    Mar 14, 2015
    Posts:
    56
    Minecraft User:
    MineBuilderFR
    Problem correct , I have not set .yml in enchant.yml =P

    Thanks For pour help @applqpak and @Creeperface :)
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    They are classes, not files.
  6. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Thanks for correcting me. :)
  7. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Lol, no worries! :)

Share This Page

Advertisement