VersionCheck constructor
VersionCheck(})
Checks whether the player updated or downdated your datapack.
constructor | |
---|---|
int | the datapacks current version |
onDowndate | a List of Widgets that are executed if it detects that you have downgraded |
onUpdate | a List of Widgets that are executed if it detects that you have upgraded |
then | a Function that takes in the used Score and reacts respectively returning a Widget(optional) |
score | change the scores name(optional) |
Example:
VersionCheck(
2,
onDowndate: [Log('Notice: You installed an older version')],
onUpdate: [Log('Thank your for updating the pack!')],
)
Implementation
VersionCheck(
this.currentVersion, {
this.score = 'objd_data',
this.onDowndate,
this.onUpdate,
this.then,
});