fix(mover): 🐛 fix crash when no mobs nearby while searching for rides
This commit is contained in:
parent
6b1157147d
commit
fc43985337
|
@ -89,7 +89,7 @@ function ride(entity) {
|
||||||
const maybeRidableMob = e.mobType?.split(" ")
|
const maybeRidableMob = e.mobType?.split(" ")
|
||||||
return e.kind == "Vehicles"
|
return e.kind == "Vehicles"
|
||||||
|| ridableMobs.includes(e.mobType)
|
|| ridableMobs.includes(e.mobType)
|
||||||
|| ridableMobs.includes(maybeRidableMob[maybeRidableMob.length - 1])
|
|| maybeRidableMob && ridableMobs.includes(maybeRidableMob[maybeRidableMob.length - 1])
|
||||||
})
|
})
|
||||||
if (!vehicle) {
|
if (!vehicle) {
|
||||||
return cfg.quiet || bot.chat(`Nothing to ${message_parts[0]}`)
|
return cfg.quiet || bot.chat(`Nothing to ${message_parts[0]}`)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user