shoghicp/PocketMine-MP — pull request #43 by sekjun9878 (2013-01-10 02:03:49+00:00)
Title: More API and compile_php.sh automatically installs autoconfig. Ban API added.

Hello shogicp.

I have finished the Ban API in the To-Do list.
Currently it can only ban usernames and I will work on the IP ban on the next update.

I have fully tested it the new API although you might need to do some code rewriting and further testing.

Does this make me an official developer or just a contributer? I would love to have one of them as my email signature!

--------------------------------------------------------------------------------------------------------------

Changed files: compile_php.sh, player.class.php, playerAPI.php.

Added Event "player.login" for MC_LOGIN. Event when player spawns.
WARNING: player.login ONLY RETURNS THE USERNAME OF THE PLAYER AND NOT THE EID. THIS NEEDS TO BE EITHER FIXED OR NOTED TO DEVELOPERS.

In compile_php.sh added autoconfig in the installation list.

Added Ban command and API.
Command:
ban - bans username
unban - unbans username

API: (for plugins)
$this->api->player->ban($username) - bans a username
$this->api->player->unban($username) - unbans a username
$this->api->player->checkforban($username) - returns true if banned. returns false if not banned.

--------------------------------------------------------------------------------------------------------------