I think it should have a more structured protocol, as things stand everyone who can get a script on the SDN is a 'script writer'. Even though half of them haven't a clue.
There's no need to complicate it as much as you have either. Something like:
private boolean eat() {
for (Item i : getInventory().getItems()) {
if (i != null && Arrays.asList(i.getDefinition().getActions()).contains("Eat"))
return getInventory().interact(i.getId(), "Eat");
}
return false;
}
Should work.
Generally clicking an unwalkable tile on the minimap will take you to the nearest walkable one anyway, so I don't see issues rising from this besides in extreme circumstances.