Select player not in a specific position

Select player not in a specific position - A Goalkeeper Guarding the Net

I am making an AFK machine where people go stand when they want to be AFK in vanilla Minecraft. So I am trying to detect players that is still in the AFK team (@a[team=AFK]) but not in the place where you stand to be AFK. I then want to remove them from the AFK team.

The AFK "place" (where you stand to be AFK) is cubic. Is it possible to detect players not in this 3x3x2 cubic place rather than within a radius?






Pictures about "Select player not in a specific position"

Select player not in a specific position - Man trainer fixing leg position of woman player in curling
Select player not in a specific position - Man instructor fixing position of hand of female curling player
Select player not in a specific position - Bewildered man shrugging shoulders and looking at camera while sitting at table and choosing game to play on computer





Tom Player - AXIS (Position Music - Epic Intense Dark Orchestral)




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Kampus Production, SHVETS production, SHVETS production, Robert Nagy