Hey Guys...I want to have a file from a other Plugin...So how to write? This DIDN'T work: PHP: $this->player = new Config($this->getDataFolder() . "Money/PlayersInfo/" . strtolower($player->getName()), Config::YAML); In this Example "Money" is a other Plugin...But remember(this won't work) Thanks Marcelo234
PHP: $this->player = new Config($this->getServer()->getDataPath() . "/plugins/Money/PlayersInfo/" . strtolower($player->getName()) . ".yml", Config::YAML); Tho, if both plugins are yours, I would rather use an API.
Code: [11:40:52] [Server thread/INFO]: Luchs joined the game [11:40:59] [Server thread/CRITICAL]: Could not save Config Why? C:\Users\Marcelo\Desktop\McKaff_BowBash\McKaff_BowBash\plugins\McKaff_BowBash//plugins/McKaff_BowBash/PlayersInfo/luchs: file_put_contents(C:\Users\Marcelo\Desktop\McKaff_BowBash\McKaff_BowBash\plugins\McKaff_BowBash//plugins/McKaff_BowBash/PlayersInfo/luchs): failed to open stream: No such file or directory [11:41:01] [Server thread/INFO]: Luchs left the game
The File i want to get is in [plugins/Money/resources/PlayersInfo/Luchs] And if i look at the Error it seams that the Plugin search in [plugins/otherplugin/Mony/resources/PlayersInfo/Luchs
resources is the file where the not written config is. You have to look in /pluginss/PlayersInfo/Luchs
PHP: public function registerSettings(){ $settings = ["McKaff_Settings"]; foreach($settings as $plugin){ $ins = $this->getServer()->getPluginManager()->getPlugin($plugin); if($ins instanceof Plugin && $ins->isEnabled()){ $this->settings = $ins; $this->getServer()->getLogger()->info(TextFormat::BLUE."[BB]Sucesfully connected with $plugin"); } else{ $this->getServer()->getLogger()->info(TextFormat::RED."[BB]WARNING! Can't find $plugin"); } } } If I start the Server there stand "[BB]WARNING! Can't find $plugin" INFO: The McKaff_Settings-Plugin is in the Pluginfolder! It works only if the Plugin is a .phar....But is there a way ,that the McKaff_Settings-Plugin could be a sourcefolder? I think this is the Problem in my Thread....This is the ground, why my Server didn't get the right parth's! Thanks Marcelo234