kolbytn/mindcraft

TypeError: Cannot read properties of null (reading 'name')

Opened this issue · 4 comments

This could be a mineflayer thing but it looks like to me there is no check in place for knowing if the player is alive before running that function. You could implement that and see how it goes.

I think this could be a bug when the agent player is dead, you need to write on code a checker if the agent exists so you can check his name (If someone can implement this before me).

I think a better solution is via interfacing this modes and them instanciating when the agent is alive, but for now if it's not that criticall it could be enough to just check if the agent exists.

Could you please give more context or detail about this problem? If this error throws when you tried to give some command via chat or if this occur in other situation?

Or a better provisory way is to set the health of agents to be infinite, so they never die and this bug never occurs (but still to treat this issue latter)

See #83