Check for an environment first. Fixes 2880.
Merge branch 'master' of github.com:sk89q/commandhelper