setToResult method

Score setToResult(
  1. Command commmand, {
  2. bool useSuccess = false,
})

sets the score to the success of the given Command

Implementation

Score setToResult(Command commmand, {bool useSuccess = false}) {
  return addCommandRet(
    Command(
      'execute store ${useSuccess ? 'success' : 'result'} score ${toString()} run $commmand',
    ),
  );
}