// Path: src/main/java/com/thevoxelbox/vsl/api/variables/VariableHolder.java
// public interface VariableHolder
// {
// 
//     /**
//      * Sets whether the variable holder should use case sensitive keys for its
//      * variable storage.
//      * 
//      * @param cs Case sensitive keys
//      */
//     void setCaseSensitive(boolean cs);
// 
//     /**
//      * Returns the variable with the given name, or null if there is no variable
//      * with that name in this storage container.
//      * 
//      * @param name the name of the object to fetch, cannot be null
//      * @return the value or null if no value is found
//      */
//     Optional<Object> get(String name);
// 
//     /**
//      * Returns the variable with the given name, or null if there is no variable
//      * with that name in this storage container.
//      * 
//      * @param name the name of the object to fetch, cannot be null
//      * @param type The expected value type
//      * @param <T> The type
//      * @return the value or null if no value is found
//      */
//     <T> Optional<T> get(String name, Class<T> type);
// 
//     /**
//      * Puts a named value into this storage container
//      * 
//      * @param name the name of the value to add, cannot be null
//      * @param value the value to add
//      */
//     void set(String name, Object value);
// 
//     /**
//      * Checks if this storage container has a value with the given name.
//      * 
//      * @param name the name to check
//      * @return whether a value with this name exists
//      */
//     boolean hasValue(String name);
// 
//     /**
//      * Gets a Set of all keys stored within this variable holder.
//      * 
//      * @return The keyset
//      */
//     Set<String> keyset();
//     
//     /**
//      * Clears the values from this variable holder.
//      */
//     void clear();
// 
// }
// 
// Path: src/main/java/com/thevoxelbox/vsl/api/variables/VariableScope.java
// public interface VariableScope extends VariableHolder
// {
// 
//     /**
//      * Sets the parent {@link VariableScope}.
//      * 
//      * @param scope the new parent, cannot be null
//      */
//     void setParent(VariableHolder scope);
// 
//     /**
//      * Returns the parent of this VariableScope or null if this VariableScope
//      * has no parent.
//      * 
//      * @return the parent, may be null
//      */
//     Optional<VariableHolder> getParent();
// 
//     /**
//      * Returns the highest parent VariableScope. That is the farthest parent
//      * VariableScope by recursively calling {@link #getParent()} until a
//      * VariableScope with no parent is reached. Returns null if this
//      * VariableScope has no parent.
//      * 
//      * @return the highest parent, may be null
//      */
//     Optional<VariableHolder> getHighestParent();
// }


import com.thevoxelbox.vsl.api.variables.VariableHolder;
import com.thevoxelbox.vsl.api.variables.VariableScope;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Optional;
import com.google.common.collect.Sets;
        this.caseSensitive = cs;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Optional<Object> get(String name)
    {
        if (name == null || name.isEmpty())
        {
            return Optional.absent();
        }
        if (!this.caseSensitive)
        {
            name = name.toLowerCase();
        }
        if (this.vars.containsKey(name))
        {
            return Optional.fromNullable(this.vars.get(name));
        } else if (this.parent != null)
        {
            return this.parent.get(name);
        }
        return Optional.absent();
    }

    /**
     * {@inheritDoc}
     */
// Path: src/main/java/com/thevoxelbox/vsl/api/variables/VariableHolder.java
// public interface VariableHolder
// {
// 
//     /**
//      * Sets whether the variable holder should use case sensitive keys for its
//      * variable storage.
//      * 
//      * @param cs Case sensitive keys
//      */
//     void setCaseSensitive(boolean cs);
// 
//     /**
//      * Returns the variable with the given name, or null if there is no variable
//      * with that name in this storage container.
//      * 
//      * @param name the name of the object to fetch, cannot be null
//      * @return the value or null if no value is found
//      */
//     Optional<Object> get(String name);
// 
//     /**
//      * Returns the variable with the given name, or null if there is no variable
//      * with that name in this storage container.
//      * 
//      * @param name the name of the object to fetch, cannot be null
//      * @param type The expected value type
//      * @param <T> The type
//      * @return the value or null if no value is found
//      */
//     <T> Optional<T> get(String name, Class<T> type);
// 
//     /**
//      * Puts a named value into this storage container
//      * 
//      * @param name the name of the value to add, cannot be null
//      * @param value the value to add
//      */
//     void set(String name, Object value);
// 
//     /**
//      * Checks if this storage container has a value with the given name.
//      * 
//      * @param name the name to check
//      * @return whether a value with this name exists
//      */
//     boolean hasValue(String name);
// 
//     /**
//      * Gets a Set of all keys stored within this variable holder.
//      * 
//      * @return The keyset
//      */
//     Set<String> keyset();
//     
//     /**
//      * Clears the values from this variable holder.
//      */
//     void clear();
// 
// }
// 
// Path: src/main/java/com/thevoxelbox/vsl/api/variables/VariableScope.java
// public interface VariableScope extends VariableHolder
// {
// 
//     /**
//      * Sets the parent {@link VariableScope}.
//      * 
//      * @param scope the new parent, cannot be null
//      */
//     void setParent(VariableHolder scope);
// 
//     /**
//      * Returns the parent of this VariableScope or null if this VariableScope
//      * has no parent.
//      * 
//      * @return the parent, may be null
//      */
//     Optional<VariableHolder> getParent();
// 
//     /**
//      * Returns the highest parent VariableScope. That is the farthest parent
//      * VariableScope by recursively calling {@link #getParent()} until a
//      * VariableScope with no parent is reached. Returns null if this
//      * VariableScope has no parent.
//      * 
//      * @return the highest parent, may be null
//      */
//     Optional<VariableHolder> getHighestParent();
// }


// Path: src/main/java/com/thevoxelbox/vsl/variables/ParentedVariableScope.java
import com.thevoxelbox.vsl.api.variables.VariableHolder;
import com.thevoxelbox.vsl.api.variables.VariableScope;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Optional;
import com.google.common.collect.Sets;

        this.caseSensitive = cs;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Optional<Object> get(String name)
    {
        if (name == null || name.isEmpty())
        {
            return Optional.absent();
        }
        if (!this.caseSensitive)
        {
            name = name.toLowerCase();
        }
        if (this.vars.containsKey(name))
        {
            return Optional.fromNullable(this.vars.get(name));
        } else if (this.parent != null)
        {
            return this.parent.get(name);
        }
        return Optional.absent();
    }

    /**
     * {@inheritDoc}
     */
    @Override