refactor(command): 🚚 move vehicle commands near other moves

Move the following:
- vehicle commands next to other movement related commands like `go`.
- move `ride` / `mount` command functionality into mover plugin
cover
jay 3 years ago
parent 974d460061
commit e6d29576e7
  1. 22
      lib/plugins/command.js
  2. 4
      lib/plugins/mover.js

@ -217,6 +217,16 @@ function command(username, message) {
subcommand("go follow once")
}
break;
case "ride":
case "mount":
cfg.plugins.mover.command(message_parts)
break
case "unride":
case "getoff":
case "unmount":
case "dismount":
bot.dismount()
break
case "move":
case "go":
cfg.plugins.mover.command(message_parts.slice(1), player)
@ -318,18 +328,6 @@ function command(username, message) {
case "info":
cfg.plugins.informer.command(message_parts.splice(1))
break
case "ride":
case "mount":
bot.mount(bot.nearestEntity())
break
case "getoff":
case "unmount":
case "dismount":
bot.dismount()
break
case "go":
bot.moveVehicle(0, 10)
break
// case "use":
// bot.useOn(bot.nearestEntity())
// break;

@ -194,6 +194,10 @@ function command(message_parts, player) {
break
}
break
case "ride":
case "mount":
bot.mount(bot.nearestEntity())
break
case "w":
case "f":
command(["forward"].concat(message_parts.slice(1)))

Loading…
Cancel
Save