Fixed a bug (exception in the console on click on the small crafting grid).

Type of the crafting type constants changed from String to int (to be able to
use == to test the value).
Fixed a bunch of bug if some players are offline (mainly team-related).