I'm trying to get the plugins data folder from a populator class which is running on the generator thread. Someone told me on discord to "just pass the path string in the constructor", but this isn't going to work because I'll then have to pass the string though the generators constructor, then to the biomes constructor, then to the populators constructor. Here is an example of what I mean; PHP: class Main extends PluginBase { public function onEnable():void { /* can't even pass "$this" to the generator class... I need to get "$this->getDataFolder();" to the generator thread */ GeneratorManager::addGenerator(TestGenerator::class, "testGenerator"); }}class TestGenerator extends Generator { public function __construct(array $options = []) { $reflect = new \ReflectionMethod(Biome::class, 'register'); $reflect->invoke(null, BiomeIds::PLAINS, new PlainsBiome()); /* I cant pass the Main instance to the biome and then onto the populator because Idk how to get it into the generator It would look something like "new PlainsBiome(Main::getInstance())" if there was a static method in main that returned the main plugin instance */ }}class PlainsBiome extends Biome { public function __construct() { $populator = new TestPopulator(/*should pass populator settings from datafolder in config here*/); $this->addPopulator($populator); }}class TestPopulator extends Populator { private $plugin public function __construct(Main $plugin /*receive settings from previous class*/) { $this->plugin = $plugin; } public function populate(ChunkManager $level, $chunkX, $chunkZ, Random $random) { var_dump($this->plugin->getDataFolder()); }} The closest thing I've found on how to achieve what I'm looking for is in this post by Jack Noordhuis Could someone explain how I can go about serializing the data and how to send it to the generator thread?