Running plugins based on build infrastructure

Is it possible to run plugins only when my build is running locally? Is there perhaps some sort of EnvVar or something that is set only when the Build is started with ‘–local’?