Make the ad prefix self care better
This commit is contained in:
parent
223cd5a0aa
commit
a1c91568d3
1 changed files with 5 additions and 1 deletions
|
@ -111,13 +111,17 @@ module.exports = {
|
|||
}
|
||||
b.add_sc_task('playerlist_ads', () => {
|
||||
b.chat(`/prefix ${parseMc(b.adPrefix).replaceAll('§', '&')}`)
|
||||
b.sc_tasks.playerlist_ads.failed = 0
|
||||
})
|
||||
b.on('playerdata', (uuid, displayName) => {
|
||||
if (uuid === b._client.uuid && !displayName.startsWith(parsePlain(b.adPrefix))) {
|
||||
b.sc_tasks.playerlist_ads.failed = 1
|
||||
}
|
||||
})
|
||||
b.on('plainchat', (msg) => {
|
||||
if (msg === `You now have the tag: ${parseMc(b.adPrefix).replaceAll('§', '&')}`) {
|
||||
b.sc_tasks.playerlist_ads.failed = 0
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue