Update api.php

Included getServerType() function.

Returns either MCPC or BUKKIT or dies due to wrong server type or invalid configuration.