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

Get Access of other Folders

Comments in 'Plugin Development' started by CraftYourBukkit, Apr 11, 2015.

  1. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Hey there, I want to look with a Plugin whether a Player is written down in a File which is placed in the Folder Teams in Plugins but I only know
    PHP:
    $this->getDataFolder()
    so how do I get Access to a Folder of another Plugin?
    EvolSoft and LDX like this.
  2. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    Code:
    $this->getServer()->getPluginManager()->getPlugin("MyPlugin")->getDataFolder()
    
    Of course, error checking is left as an exercise to the reader...
  3. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Thanks! Error is the missing ; isn't it? xD
  4. Exxarion
    Offline

    Exxarion Active Member Plugin Developer

    Joined:
    Jan 5, 2014
    Posts:
    242
    Plugins:
    1
    Minecraft User:
    Notch
    PHP:
    $this->getServer()->getPluginManager()->getPlugin("MyPlugin")->getDataFolder();

Share This Page

Advertisement