Walking should automaticly close the interface, if you want to make it so they can't walk at all, find the method that adds a path to the queu and add an if statement which looks somewhat like this:
if(player.getOpenInterface() == INTERFACE_ID)
return;