Turns out that when a plant gets hurt, it uses a similar process to animals that helps defend itself.