Is there a way to set a level's spawn radius? So far I have not found any method or function for this. Is it even possible?
Level means World. Or in this case worlds, because I want to set the spawn radius differently for each world.
maybe https://github.com/LDX-MCPE/PeacefulSpawn/edit/master/src/LDX/PeacefulSpawn/Main.php surely you can help
You can use the default functions of php to edit server.properties, and using $this->getServer()->dispatchCommand(new ConsoleCommandSender(), "reload"); to reload properties.
Did he say that? I don't think so. He told you to look at the code and try to understand it, and try to use the things you learned from it in your own plugin.
It is the server's spawn radius, not level's spawn radius. PocketMine does not have per-level spawn radius. Anyway PHP: $server->setConfigInt("spawn-protection", $newValue); Remember, pass an INTEGER to the function. Not a string.
I have made the plugin. It sets custom spawn protection radius' for each world, it also has built in peacefulspawn. https://github.com/HotshotHD/CustomRadius