Okay; So I am very new to the use of tasks (feel free to call me a code noob and google noob), and after reading the tutorials in the resource section, I still cannot find what exactly __construct is used for. I don't really understand the idea of $owner and $plugin. Also, I am not sure the definition of them at all, since I can't find where it is defined at. PHP: function __construct(EconomyGamble $owner) {parent::__construct ($owner);} PHP: protected $owner, $plugin;public function __construct(Plugin $owner, Main $plugin) {parent::__construct ($owner);$this->plugin = $plugin;} In other words, I just don't understand the meaning of it at all... the __construct and parent::__construct($owner) is quite different from what I have learnt, and the use/meaning of $plugin and $owner...
Code: $this->getServer()->getScheduler()->scheduleRepeatingTask(new CallbackTask([$this,"Task"]),10); is this what your Looking for?
Not really, since I am trying to understand the usage and the meaning of the __construct used in the examples provided above. Also, never use CallBackTask.
PHP.net: PHP 5 allows developers to declare constructor methods for classes. Classes which have a constructor method call this method on each newly-created object, so it is suitable for any initialization that the object may need before it is used.