diff --git a/bot/ingame.go b/bot/ingame.go index a8742a4..cc1a3b2 100644 --- a/bot/ingame.go +++ b/bot/ingame.go @@ -2,6 +2,7 @@ package bot import ( "bytes" + "errors" "fmt" "io/ioutil" @@ -201,7 +202,7 @@ func handleSetSlotPacket(c *Client, p pk.Packet) error { slotI pk.Short slot entity.Slot ) - if err := p.Scan(&windowID, &slotI, &slot); err != nil && err != nbt.ErrEND { + if err := p.Scan(&windowID, &slotI, &slot); errors.Is(err, nbt.ErrEND) { return err }