Bug fix: return onPlayerSuccess generated function