/undo undoes the most recent command you've done. For example, if you destroy an entity or accidentally give the wrong item to a person, you could simply type /undo and the ship would reappear, or the items would disappear from their inventory. Obviously this would have some limitations- if a person has already put the items in a storage or dropped them on the ground, you wouldn't be able to /undo that. /redo redoes a command you've undone.