so im making a coal gen part in my core. I have everything setup and its working, except I want to add a delay on the time it takes to respawn the coal. I have looked everywhere and most people use the main class for their Task. I need it to be in the CoalListener class so i can get the coords of the Coal. Please help me, thank you
In the future it would be cool if you post the answer to the forum, too so that people can reference it easier in case anyone else has the same problem.
Answer: In the Event Listener: PHP: $this->core->getScheduler()->scheduleDelayedTask(new CoalGenTask($this->core, $block), 3 * 20); In the "CoalGenTask" Class PHP: private $core;private $block;public function __construct(core $core, Block $block){ $this->core = $core; $this->block = $block;} Thank You