// Path: src/main/java/wdl/range/IRangeGroupType.java
// public interface IRangeGroupType<T extends IRangeProducer> {
// 	/**
// 	 * Validates that the given {@link ConfigurationSection} is acceptable.
// 	 * 
// 	 * @param config
// 	 *            The config to check.
// 	 * @param warnings
// 	 *            A list to put warnings into if if any occur.
// 	 * @param errors
// 	 *            A list to put errors into if if any occur.
// 	 * @return <code>false</code> if the configuration is fatally unacceptable
// 	 *         to the point where this {@link IRangeProducer} should not
// 	 *         use it.  Note that other {@link ConfigurationSection}s may still
// 	 *         be used with this {@link IRangeProducer}.
// 	 */
// 	public abstract boolean isValidConfig(ConfigurationSection config,
// 			List<String> warnings, List<String> errors);
// 	
// 	/**
// 	 * Creates a new {@link IRangeProducer} from the given configuration
// 	 * section. Will only be called if
// 	 * {@link #isValidConfig(ConfigurationSection, List, List)} returned true.
// 	 * 
// 	 * @param config
// 	 *            The config to check.
// 	 */
// 	public abstract T createRangeProducer(
// 			IRangeGroup group, ConfigurationSection config);
// 	
// 	/**
// 	 * Disposes of this {@link IRangeGroupType}.  Events should be unregistered,
// 	 * etc.  Note that this should NOT dispose any created {@link IRangeProducer}s;
// 	 * they will be handled manually.
// 	 * 
// 	 * After this method has been called, this {@link IRangeGroupType} instance
// 	 * will no longer be used.  In most cases, a new instance will be created
// 	 * (potentially with a different configuration).
// 	 * 
// 	 * Note: To unregister all events in a {@link Listener}, you can call
// 	 * {@link HandlerList#unregisterAll(Listener)}.
// 	 */
// 	public abstract void dispose();
// }


import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.plugin.AuthorNagException;
import wdl.range.IRangeGroupType;

package wdl;



/**
 * Event that is raised when {@link WDLCompanion} is ready to receive new
 * {@link IRangeGroupType} registrations.
 */
public final class RangeGroupTypeRegistrationEvent extends Event {
	private static final HandlerList handlers = new HandlerList();
	
	private final WDLCompanion plugin;
	/**
	 * Has the registration finished (and thus no more registrations should be
	 * allowed via this event?)
	 */
	private boolean finished = false;
	
	RangeGroupTypeRegistrationEvent(WDLCompanion plugin) {
		super(false);
		
		this.plugin = plugin;
	}
	
	@Override
	public HandlerList getHandlers() {
		return handlers;
	}
	
	public static HandlerList getHandlerList() {
		return handlers;
	}
	
	/**
	 * Registers a new {@link IRangeGroupType}, with the given name.
	 * 
	 * @param id
	 *            The ID to register under.
	 * @param rangeGroupType
	 *            The {@link IRangeGroupType} to register.
	 * @throws IllegalArgumentException
	 *             If there already is a registration for the given ID
	 * @throws IllegalArgumentException
	 *             If either id or rangeProducer are null.
	 */

// Path: src/main/java/wdl/range/IRangeGroupType.java
// public interface IRangeGroupType<T extends IRangeProducer> {
// 	/**
// 	 * Validates that the given {@link ConfigurationSection} is acceptable.
// 	 * 
// 	 * @param config
// 	 *            The config to check.
// 	 * @param warnings
// 	 *            A list to put warnings into if if any occur.
// 	 * @param errors
// 	 *            A list to put errors into if if any occur.
// 	 * @return <code>false</code> if the configuration is fatally unacceptable
// 	 *         to the point where this {@link IRangeProducer} should not
// 	 *         use it.  Note that other {@link ConfigurationSection}s may still
// 	 *         be used with this {@link IRangeProducer}.
// 	 */
// 	public abstract boolean isValidConfig(ConfigurationSection config,
// 			List<String> warnings, List<String> errors);
// 	
// 	/**
// 	 * Creates a new {@link IRangeProducer} from the given configuration
// 	 * section. Will only be called if
// 	 * {@link #isValidConfig(ConfigurationSection, List, List)} returned true.
// 	 * 
// 	 * @param config
// 	 *            The config to check.
// 	 */
// 	public abstract T createRangeProducer(
// 			IRangeGroup group, ConfigurationSection config);
// 	
// 	/**
// 	 * Disposes of this {@link IRangeGroupType}.  Events should be unregistered,
// 	 * etc.  Note that this should NOT dispose any created {@link IRangeProducer}s;
// 	 * they will be handled manually.
// 	 * 
// 	 * After this method has been called, this {@link IRangeGroupType} instance
// 	 * will no longer be used.  In most cases, a new instance will be created
// 	 * (potentially with a different configuration).
// 	 * 
// 	 * Note: To unregister all events in a {@link Listener}, you can call
// 	 * {@link HandlerList#unregisterAll(Listener)}.
// 	 */
// 	public abstract void dispose();
// }


// Path: src/main/java/wdl/RangeGroupTypeRegistrationEvent.java
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.plugin.AuthorNagException;
import wdl.range.IRangeGroupType;

package wdl;



/**
 * Event that is raised when {@link WDLCompanion} is ready to receive new
 * {@link IRangeGroupType} registrations.
 */
public final class RangeGroupTypeRegistrationEvent extends Event {
	private static final HandlerList handlers = new HandlerList();
	
	private final WDLCompanion plugin;
	/**
	 * Has the registration finished (and thus no more registrations should be
	 * allowed via this event?)
	 */
	private boolean finished = false;
	
	RangeGroupTypeRegistrationEvent(WDLCompanion plugin) {
		super(false);
		
		this.plugin = plugin;
	}
	
	@Override
	public HandlerList getHandlers() {
		return handlers;
	}
	
	public static HandlerList getHandlerList() {
		return handlers;
	}
	
	/**
	 * Registers a new {@link IRangeGroupType}, with the given name.
	 * 
	 * @param id
	 *            The ID to register under.
	 * @param rangeGroupType
	 *            The {@link IRangeGroupType} to register.
	 * @throws IllegalArgumentException
	 *             If there already is a registration for the given ID
	 * @throws IllegalArgumentException
	 *             If either id or rangeProducer are null.
	 */

	public void addRegistration(String id, IRangeGroupType<?> rangeGroupType)
