/*
 * MIT License
 *
 * Copyright (c) 2017 Connor Hartley
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.ichorpowered.guardian.api.sequence;

import com.ichorpowered.guardian.api.detection.DetectionConfiguration;
import com.ichorpowered.guardian.api.detection.check.Check;
import com.ichorpowered.guardian.api.sequence.action.Action;
import com.ichorpowered.guardian.api.sequence.action.ActionBlueprint;
import com.ichorpowered.guardian.api.sequence.action.ActionBuilder;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * Represents a builder to create a {@link Sequence} with.
 *
 * @param <E> the checks detection owner type
 * @param <F> the checks detection configuration type
 */
public interface SequenceBuilder<E, F extends DetectionConfiguration> {

    /**
     * Returns a new {@link ActionBuilder} for an
     * event, by its class.
     *
     * @param clazz the event class
     * @param <T> the event type
     * @return the action builder
     */
    @Nonnull
    <T> ActionBuilder<E, F, T> action(@Nullable Class<T> clazz);

    /**
     * Returns a new {@link ActionBuilder} for an
     * event, by its {@link ActionBlueprint}.
     *
     * @param blueprint the action blueprint
     * @param <T> the event type
     * @return the action builder
     */
    @Nonnull
    <T> ActionBuilder<E, F, T> action(@Nullable ActionBlueprint<T> blueprint);

    /**
     * Returns a new {@link ActionBuilder} for an
     * event, by its {@link Action}.
     *
     * @param action the action
     * @param <T> the event type
     * @return the action builder
     */
    @Nonnull
    <T> ActionBuilder<E, F, T> action(@Nullable Action<T> action);

    /**
     * Returns a new {@link SequenceBlueprint} for
     * creating new {@link Sequence}s with.
     *
     * @param check the check
     * @return the sequence blueprint
     */
    @Nonnull
    SequenceBlueprint<E, F> build(Check<E, F> check);

}

@@ -1508,16 +1508,150 @@
 Builder;
+%0Aimport com.ichorpowered.guardian.api.sequence.capture.Capture;%0Aimport com.ichorpowered.guardian.api.sequence.capture.CaptureRegistry;
 %0A%0Aimport
@@ -1955,16 +1955,282 @@
 ion%3E %7B%0A%0A
+    /**%0A     * Adds captures to the %7B@link CaptureRegistry%7D to be%0A     * included on new %7B@link Sequence%7Ds created.%0A     *%0A     * @param captures the captures%0A     * @return the sequence builder%0A     */%0A    SequenceBuilder%3CE, F%3E capture(Capture%3CE, F%3E... captures);%0A%0A
     /**%0A
@@ -3246,23 +3246,118 @@
 ram 
-check the check
+pluginContainer the plugin container%0A     * @param check the check%0A     * @param %3CC%3E the plugin container type
 %0A   
@@ -3411,24 +3411,28 @@
 @Nonnull%0A   
+ %3CC%3E
  SequenceBlu
@@ -3450,16 +3450,35 @@
 %3E build(
+C pluginContainer, 
 Check%3CE,

Add sequence builder method to register captures