// Path: SpongePowered/MyFirstSpongePlugIn/src/main/java/ch/vorburger/minecraft/command/AbstractPluginWithCommands.java
// public abstract class AbstractPluginWithCommands extends AbstractHotPlugin {
// 
// 	protected @Inject PluginContainer plugin;
// 
// 	private @Inject AnnotatedCommandManager commandManager;
// 
// 	protected void onServerStarting() {
// 	}
// 
// 	protected void onServerStopping() {
// 	}
// 
// 	@Override
// 	@Listener
// 	public final void onServerStarting(GameStartingServerEvent event) {
// 		super.onServerStarting(event);
// 		commandManager.register(plugin, this);
// 		onServerStarting();
// 	}
// 
// 	@Override
// 	@Listener
// 	public final void onServerStopping(GameStoppingServerEvent event) {
// 		super.onServerStopping(event);
// 		commandManager.unregisterAll();
// 		onServerStopping();
// 	}
// 
// }
// 
// Path: SpongePowered/MyFirstSpongePlugIn/src/main/java/ch/vorburger/minecraft/utils/MinecraftHelperException.java
// public class MinecraftHelperException extends Exception {
//     private static final long serialVersionUID = 1;
// 
// 	public MinecraftHelperException(String message) {
// 		super(message);
// 	}
// 
// 	public MinecraftHelperException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// }
// 
// Path: SpongePowered/MyFirstSpongePlugIn/src/main/java/ch/vorburger/minecraft/utils/SpawnHelper.java
// public class SpawnHelper {
// 	private final static Logger logger = LoggerFactory.getLogger(SpawnHelper.class);
// 
// 	private Map<Class<? extends Entity>, EntityType> entityClassToTypeMap;
// 
// 	protected void populateNewEntityClassToTypeMap(Map<Class<? extends Entity>, EntityType> map) {
// 		map.put(Human.class, EntityTypes.HUMAN);
// 		map.put(Pig.class, EntityTypes.PIG);
// 	}
// 
// 	// LNE = Log, but Never Exception. Returns Optional instead.
// 	public <T extends Entity> Optional<T> spawnLNE(Class<T> entityClass, Location<World> startingLocation) {
// 		try {
// 			return Optional.of(spawn(entityClass, startingLocation));
// 		} catch (MinecraftHelperException e) {
// 			logger.error(e.getMessage(), e);
// 			return Optional.empty();
// 		}
// 	}
// 
// 	public <T extends Entity> T spawn(Class<T> entityClass, Location<World> location) throws MinecraftHelperException {
// 		EntityType entityType = getEntityType(entityClass);
// 		EntityUniverse entityUniverse = location.getExtent();
// 		Optional<Entity> optionalEntity = entityUniverse.createEntity(entityType, location.getPosition());
// 		if (optionalEntity.isPresent()) {
// 			@SuppressWarnings("unchecked") T newEntity = (T) optionalEntity.get();
// 			boolean isSpawned = entityUniverse.spawnEntity(newEntity, null /* Cause.empty() */);
// 			if (!isSpawned)
// 				throw new MinecraftHelperException("Could not spawn new Entity: " + entityType.getName());
// 			return newEntity;
// 		} else {
// 			throw new MinecraftHelperException("Could not create new Entity: " + entityType.getName());
// 		}
// 	}
// 
// 	protected <T extends Entity> EntityType getEntityType(Class<T> entityClass) throws MinecraftHelperException {
// 		Optional<EntityType> optionalEntityType = getEntityTypeOptional(entityClass);
// 		if (!optionalEntityType.isPresent()) {
// 			throw new MinecraftHelperException("EntityType not found for entityClass: " + entityClass.getName());
// 		}
// 		EntityType entityType = optionalEntityType.get();
// 		// TODO isAssignable..
// 		//		if (!entityType.getEntityClass().equals(entityClass)) {
// 		//			throw new MinecraftHelperException("EntityType " + entityType.getName() + "'s entityClass " + entityType.getEntityClass() + " != " + entityClass);
// 		//		}
// 		return entityType;
// 	}
// 
// 	protected <T extends Entity> Optional<EntityType> getEntityTypeOptional(Class<T> entityClass) {
// 		return Optional.ofNullable(getEntityClassToTypeMap().get(entityClass));
// 	}
// 
// 	protected <T extends Entity> Map<Class<? extends Entity>, EntityType> getEntityClassToTypeMap() {
// 		if (entityClassToTypeMap == null) {
// 			Map<Class<? extends Entity>, EntityType> newEntityClassToTypeMap = new HashMap<>(70);
// 			populateNewEntityClassToTypeMap(newEntityClassToTypeMap);
// 			entityClassToTypeMap = newEntityClassToTypeMap;
// 		}
// 		return entityClassToTypeMap;
// 	}
// 
// }


import java.util.Map;
import java.util.function.Function;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongepowered.api.command.source.LocatedSource;
import org.spongepowered.api.entity.living.Human;
import com.google.common.collect.MapMaker;
import ch.vorburger.minecraft.command.AbstractPluginWithCommands;
import ch.vorburger.minecraft.command.Command;
import ch.vorburger.minecraft.utils.MinecraftHelperException;
import ch.vorburger.minecraft.utils.SpawnHelper;
package ch.vorburger.minecraft.logo;





// @Plugin(id = "ch.vorburger.minecraft.logo", name = "LOGO", description="Logo-like commands (thank you, Seymour Papert)", version = "1.0")
public class LogoPlugin extends AbstractPluginWithCommands {
	private final static Logger logger = LoggerFactory.getLogger(LogoPlugin.class);

	Map<LocatedSource, TurtleImpl> playerTurtleMap = new MapMaker().makeMap();
// Path: SpongePowered/MyFirstSpongePlugIn/src/main/java/ch/vorburger/minecraft/command/AbstractPluginWithCommands.java
// public abstract class AbstractPluginWithCommands extends AbstractHotPlugin {
// 
// 	protected @Inject PluginContainer plugin;
// 
// 	private @Inject AnnotatedCommandManager commandManager;
// 
// 	protected void onServerStarting() {
// 	}
// 
// 	protected void onServerStopping() {
// 	}
// 
// 	@Override
// 	@Listener
// 	public final void onServerStarting(GameStartingServerEvent event) {
// 		super.onServerStarting(event);
// 		commandManager.register(plugin, this);
// 		onServerStarting();
// 	}
// 
// 	@Override
// 	@Listener
// 	public final void onServerStopping(GameStoppingServerEvent event) {
// 		super.onServerStopping(event);
// 		commandManager.unregisterAll();
// 		onServerStopping();
// 	}
// 
// }
// 
// Path: SpongePowered/MyFirstSpongePlugIn/src/main/java/ch/vorburger/minecraft/utils/MinecraftHelperException.java
// public class MinecraftHelperException extends Exception {
//     private static final long serialVersionUID = 1;
// 
// 	public MinecraftHelperException(String message) {
// 		super(message);
// 	}
// 
// 	public MinecraftHelperException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// }
// 
// Path: SpongePowered/MyFirstSpongePlugIn/src/main/java/ch/vorburger/minecraft/utils/SpawnHelper.java
// public class SpawnHelper {
// 	private final static Logger logger = LoggerFactory.getLogger(SpawnHelper.class);
// 
// 	private Map<Class<? extends Entity>, EntityType> entityClassToTypeMap;
// 
// 	protected void populateNewEntityClassToTypeMap(Map<Class<? extends Entity>, EntityType> map) {
// 		map.put(Human.class, EntityTypes.HUMAN);
// 		map.put(Pig.class, EntityTypes.PIG);
// 	}
// 
// 	// LNE = Log, but Never Exception. Returns Optional instead.
// 	public <T extends Entity> Optional<T> spawnLNE(Class<T> entityClass, Location<World> startingLocation) {
// 		try {
// 			return Optional.of(spawn(entityClass, startingLocation));
// 		} catch (MinecraftHelperException e) {
// 			logger.error(e.getMessage(), e);
// 			return Optional.empty();
// 		}
// 	}
// 
// 	public <T extends Entity> T spawn(Class<T> entityClass, Location<World> location) throws MinecraftHelperException {
// 		EntityType entityType = getEntityType(entityClass);
// 		EntityUniverse entityUniverse = location.getExtent();
// 		Optional<Entity> optionalEntity = entityUniverse.createEntity(entityType, location.getPosition());
// 		if (optionalEntity.isPresent()) {
// 			@SuppressWarnings("unchecked") T newEntity = (T) optionalEntity.get();
// 			boolean isSpawned = entityUniverse.spawnEntity(newEntity, null /* Cause.empty() */);
// 			if (!isSpawned)
// 				throw new MinecraftHelperException("Could not spawn new Entity: " + entityType.getName());
// 			return newEntity;
// 		} else {
// 			throw new MinecraftHelperException("Could not create new Entity: " + entityType.getName());
// 		}
// 	}
// 
// 	protected <T extends Entity> EntityType getEntityType(Class<T> entityClass) throws MinecraftHelperException {
// 		Optional<EntityType> optionalEntityType = getEntityTypeOptional(entityClass);
// 		if (!optionalEntityType.isPresent()) {
// 			throw new MinecraftHelperException("EntityType not found for entityClass: " + entityClass.getName());
// 		}
// 		EntityType entityType = optionalEntityType.get();
// 		// TODO isAssignable..
// 		//		if (!entityType.getEntityClass().equals(entityClass)) {
// 		//			throw new MinecraftHelperException("EntityType " + entityType.getName() + "'s entityClass " + entityType.getEntityClass() + " != " + entityClass);
// 		//		}
// 		return entityType;
// 	}
// 
// 	protected <T extends Entity> Optional<EntityType> getEntityTypeOptional(Class<T> entityClass) {
// 		return Optional.ofNullable(getEntityClassToTypeMap().get(entityClass));
// 	}
// 
// 	protected <T extends Entity> Map<Class<? extends Entity>, EntityType> getEntityClassToTypeMap() {
// 		if (entityClassToTypeMap == null) {
// 			Map<Class<? extends Entity>, EntityType> newEntityClassToTypeMap = new HashMap<>(70);
// 			populateNewEntityClassToTypeMap(newEntityClassToTypeMap);
// 			entityClassToTypeMap = newEntityClassToTypeMap;
// 		}
// 		return entityClassToTypeMap;
// 	}
// 
// }


// Path: SpongePowered/MyFirstSpongePlugIn/src/main/java/ch/vorburger/minecraft/logo/LogoPlugin.java
import java.util.Map;
import java.util.function.Function;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongepowered.api.command.source.LocatedSource;
import org.spongepowered.api.entity.living.Human;
import com.google.common.collect.MapMaker;
import ch.vorburger.minecraft.command.AbstractPluginWithCommands;
import ch.vorburger.minecraft.command.Command;
import ch.vorburger.minecraft.utils.MinecraftHelperException;
import ch.vorburger.minecraft.utils.SpawnHelper;

package ch.vorburger.minecraft.logo;





// @Plugin(id = "ch.vorburger.minecraft.logo", name = "LOGO", description="Logo-like commands (thank you, Seymour Papert)", version = "1.0")
public class LogoPlugin extends AbstractPluginWithCommands {
	private final static Logger logger = LoggerFactory.getLogger(LogoPlugin.class);

	Map<LocatedSource, TurtleImpl> playerTurtleMap = new MapMaker().makeMap();
	SpawnHelper spawnHelper = new SpawnHelper();