storeResult method

Group storeResult(
  1. Widget w,
  2. BossbarOption option, {
  3. bool useSuccess = false,
})

Implementation

Group storeResult(
  Widget w,
  BossbarOption option, {
  bool useSuccess = false,
}) {
  String strOption;
  switch (option) {
    case BossbarOption.max:
      strOption = 'max';
      break;
    case BossbarOption.value:
      strOption = 'value';
      break;
    default:
      throw ('Please use BossbarOption.max or BossbarOption.value with storeResult!');
  }

  return Execute.internal_store_command(
    'bossbar $id $strOption',
    w,
    useSuccess,
  );
}