Hi my name is Jerlegoman I am in the middle of developing a plugin I call Clock And Compass Plus+ and I want to know if you are allowed to put two events in one plugin. Thanks!
For "multi-events" make the multiple event handlers in the __construct function (if on api 12) and in the EventHandler function do: PHP: public function EventHandler($data, $event){ switch($event){ case "player.join": $data->sendChat("Welcome to this server!"); break; case "player.quit": $this->api->server->broadcast("Aww... Someone left..."); break; }} (NOTE: I havent worked with API 12 in awhile and forget some of it)[/PHP]
Do you mean because the name is used for other stuff? Like he should write public function playerConnections() or something like that instead?
I've noticed you said you were developing for the OLD API, why not invest some time and learn the new one as the the old api will soon become depreciated. Edit: 1 1 1 1 100 post!
Yeah I gotta agree, the new API is so much nicer and I think even easier to work with once learned. Once there are some mor eplugins out it will be especially easy to learn
Not really ,take the transition from HTML4 to HTML5 . I learned the new syntax in some time. It's all about how much time you put into learning the new one.
No, because PocketMine plugins are object orientated. It's common practice to use "camel-case" in method names. For this you have lowercase for the first world and upper case at the start of every other word. So instead of EventHandler you would use eventHandler. It will work without this, but it would be like writing a sentence with no punctuation.