/*
 * Copyright (c) 2013 - 2015 xxyy (Philipp Nowak; devnull@nowak-at.net). All rights reserved.
 *
 * Any usage, including, but not limited to, compiling, running, redistributing, printing,
 *  copying and reverse-engineering is strictly prohibited without explicit written permission
 *  from the original author and may result in legal steps being taken.
 *
 * See the included LICENSE file (core/src/main/resources) or email xxyy98+xyclicense@gmail.com for details.
 */

package li.l1t.lanatus.api.builder.melons;

import li.l1t.common.exception.DatabaseException;

/**
 * Fluent builder interface for crediting melons to a player's account.
 *
 * @author <a href="https://l1t.li/">Literallie</a>
 * @since 2016-10-18
 */
public interface CreditMelonsBuilder {
    /**
     * @return whether the melons were credited already
     */
    boolean hasBeenExecuted();

    /**
     * Actually credits the amount of melons defined in this builder to the player. Note that this
     * method can only be executed once per builder instance.
     *
     * @throws IllegalStateException {@linkplain #hasBeenExecuted()if the melons have already been
     *                               credited}
     * @throws DatabaseException     if a database error occurs
     */
    void build() throws IllegalStateException, DatabaseException;

    /**
     * Sets the melons count to be credited to the player.
     *
     * @param melonsCount the amount of melons to credit
     * @return this builder
     * @throws IllegalArgumentException if melonsCount is negative
     */
    CreditMelonsBuilder withMelonsCount(int melonsCount);
}

@@ -563,16 +563,40 @@
 ption;%0A%0A
+import java.util.UUID;%0A%0A
 /**%0A * F
@@ -782,16 +782,181 @@
 ilder %7B%0A
+    /**%0A     * The unique id of the product that represents credited melons.%0A     */%0A    UUID PRODUCT_ID = UUID.fromString(%22e94dd44d-93ea-4f21-823e-9aa15e278803%22);%0A%0A
     /**%0A

Add product id constant to CreditMelonsBuilder interface