This includes anything that doesn't return a `.text`.
Such as an `extra`, `translate` or other `json` formatted message.
Ex:
- afk
- errors
- player leave and joins
Now, it also (un-)loads the whole plugin (sub and master).
This appears to be the most stable option.
Loading behaviour is unchanged from before (load only top level plugin).
However as a precaution, loading tries to unload bad plugins on error.
This helps to not end up in a bad state during reload.
While reloading, plugin cache may not be deleted.
This happens when a loaded plugin encounters an error during reload.
This causes a deadlock in the unloading code.
So make sure cache is always deleted:
- ignore when an `unload()` function doesn't exist
- delete cache even if there are no `exports`
Try to give a larger range and more freedom to see if other values work.
Specifically, attempt turning.
No test on vehicles or mobs appear to behave consistently so far.
Tried: pigs, minecarts, horse.
Typescript linter had an error that `require` was undefined.
This happened after updating Nodejs from 14.15 to 14.16.
Not sure if this should be a global dep or local
Attempt to fix async error returned by `bot.consume`.
Fixed by wrapping in a `try{}` block and using `.catch`.
Still don't know why or how this works 🤷.
Now does the following:
- finds entities (both vehicles and animals) which are suitable for riding.
- moves to get into range.
However:
- while in a vehicle, pathfinder doesn't appear to detec coords.
- `bot.moveVehicle` doesn't work, so bot doesn't move when riding
Move the following:
- vehicle commands next to other movement related commands like `go`.
- move `ride` / `mount` command functionality into mover plugin
This reduces the code inside the command plugin.
Most of the logic was only relevant to moving anyway.
Command aliases like `come` and `follow` still remain in command plugin.