Open
Description
- [v] The FAQ doesn't contain a resolution to my issue
Versions
- mineflayer: 10.8.2
- node: 18.20.5
Detailed description of a problem
When call bot.modes.isOn(), sometimes it raised an exception saying can't read isOn of NoneType.
Your current code
if bot.modes.isOn('cheat') :
...
Expected behavior
I am not sure if it is normal for bot.modes to be None in some cases. If this is not a normal case, I think we should always be able to call bot.modes.isOn wihout checking if bot.modes is None.
BTW, bot.entity and player.entity sometimes returns None as well, I believe these behaviors are not expected.