public boolean set(S setting, boolean state) {
        if (state == get(setting)) {
            return state;
        }

        if (state) {
            this.bits.set(setting.ordinal());
        } else {
            this.bits.clear(setting.ordinal());
        }
        return !state;
    }
Sets the state of a given setting.

@param setting the setting
@param state the state to set
@return the previous state of the setting
helper/src/main/java/me/lucko/helper/setting/BooleanSettingMap.java