Hello, I can't find the file that handle time in src. In found in \src\pocketmine\network\protocol a file called SetTimePacket but I don't think it's this one. Also, is it possible with the new API to fully handle the time changing ? Thanks. Edit : And how to schedule a repeting function without creating an other php file ? For example I create "public function example(){}" if , when the server is loading,I repeat it with "$this->getServer()->getScheduler()->scheduleRepeatingTask(example(), 120);" it say that I'm calling an undefined function. Sorry I'm just a beginner ^^
First, in PHP, you must call $this->example() to call a function in $this, instead of, like java, calling it directly. Second, you should put a Task object there. In a plugin, a PluginTask object is preferred. You can make a PluginTask referring to many examples.