generate method
Implementation
@override
Widget generate(Context context) {
var command = Command('trigger $objective $_mode');
if (enableScore != null && _mode == 'enable') {
command = Command(
'scoreboard players enable ${enableScore!.entity} ${enableScore!.score}');
}
if (addNew) {
return For.of([Scoreboard.trigger(objective), command]);
}
return command;
}