"using UnityEditor;" throws an error?

This is so strange. I’ve imported an asset from the asset store (Volumetric Lines by Johannes Unterguggenberger), and when I try to build a standalone player Unity throws this error at me:

“The type or namespace name `UnityEditor’ could not be found. Are you missing a using directive or an assembly reference?”

I have no idea what could be causing that. I’ve tried resyncing MonoDevelop, restarting Unity, etc. Nothing seems to work. It causes my whole script to break, too, because I use things from the “UnityEditor library.” I’m running Unity 5.1.2. Does anyone have any idea what could be causing this? Here’s a pastebin link of the entire script that causes errors: using UnityEditor;using UnityEngine;using System;using System.Collections; - Pastebin.com

Every script that uses UnityEditor namespace must be in folder called “Editor” because that namespace can only be used in editor. Also You can place editor code outside of “Editor” folder if you enclose it in #if UNITY_EDITOR and #endif. For example:

using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif

public class PlayerAndEditorClass : MonoBehaviour
{
    #if UNITY_EDITOR
    // editor code
    #endif

    // rest of the code
}

You cannot use classes from UnityEditor namespace outside of unity editor.