Ok so i made a function like so PHP: public function TestFunction() {console("Test");} But i dont know how to call the function i trie $this->TestFunction(); but it didn't work. Never done much with creating functions.
Hmm, looks fine to me. You're doing everything right from what I can see, I usually use functions to process info and output something. I'm no php pro but my functions usually have some sort of input or return something. @Falk , any suggestions?
Nvm i figured out what i did but does anyone know how to get the username of a player that just spawned?
PHP: public function init(){ $this->api->addHandler("player.join", array($this,"onJoin"));}public function onJoin($p){ $username = $p->username;}