[Mineflayer with Python] bot.modes is NoneType and can't read isOn #3638
Labels
possible bug
Stage1
just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Versions
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
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.
The text was updated successfully, but these errors were encountered: