Hello, im learning Pocketmine Plugin Development, the problem is that im trying to save info to the config file, but i don't know how to, i tried PHP: case 'setspawnp': $spawn = $sender->getPosition(); $this->getServer()->getconfig()->set("spawn", $spawn); $this->getServer()->save(); $sender->sendMessage(Color::GOLD."Arena Spawn Set"); break; but "getconfig()" si not a function or something that is on pocket mine, i created the yaml file, and its like this: PHP: ---spawn: 0positioncero: 0 im trying the plugin to save a position, but i don't really know how to or if im doing it good, but in a little part im confused. Please help me, thanks. sorry for being an ignorant
The following should work (assuming the code is run inside a PluginBase object) PHP: $this->getConfig()->set("spawn", $spawn);$this->getConfig()->save();
Hey!, thanks!!! i think my plugin my works, but the memory gets exhausted, is the problem of the code or of the server configuration? should the plugin work??? i established the config file in a resources folder and then the other files and folders in a folder called "src", is that ok?
where can you help me with my code? i don't think i have an infinite loop, im kind of like new to this, can you help me?