generate method
Implementation
@override
Widget generate(Context context) {
if (context.version < 19.4) {
throw "Damage requires at least version 19.4";
}
return CommandBuilder('damage $target $amount')
.string(damageType)
.when(
location != null,
then: 'at $location',
otherwise: by != null ? 'by $by' : null,
)
.string(cause?.toString(), prefix: 'from ');
}