Hello all. I am new here. My first question is: how can I access a public function defined in one of the <Namehere>API.php files from a plugin. For instance, how would I access the harm function defined in the entilietyAPI.php file from a plugin. My second question is what is the order of inheritance in the api. This may answer the first question. (More questions to come...)
Not the exact answer. The name of the api is defined at lines 199-207 at ServerAPI.php If you make a plugin's api like economys, you can also define ir like this. And @Falk, there is no any rules on the plugin development that you must have a field called api in a plugin. For instance, I like to use, like in function init(), I like to write: PHP: $s=ServerAPI:: request ();$c=$s->api->console;$s->schedule...$s->addHandler...$c->register...
I am pointing this out just to remind people not to use $this->api when they are working with multiple classes.
Sorry, I was going to write a bit about that but I figured that most developers stick with $this->api, clearly I am wrong
What? There are no any relationship between APIs, except that Server API contains fields of other APIs.
Now with this: PHP: $po[] = $this->api->player->online(); echo $po[0]; foreach($po as $key => &$pyr){ echo $pyr; } unset($pyr); echo "\n"; I get ArrayArray. What am I doing wrong? I don't use php often.
now with Code: $po[] = $this->api->player->online(); echo "".implode($po, "',"); echo "\n"; returns Array