Added hooks for world enter and exit. Added static API for player state.