// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/implementation/CraftControllableMob.java
// public class CraftControllableMob<E extends LivingEntity> implements ControllableMob<E> {
// 	private E entity;
// 	private CraftControllableMobAttributes attributes;
// 	private CraftControllableMobAI<E> ai;
// 	private CraftControllableMobActions actions;
// 	public EntityInsentient nmsEntity;
// 
// 	public CraftControllableMob(E entity, EntityInsentient notchEntity) {
// 		this.entity = entity;
// 		this.nmsEntity = notchEntity;
// 		this.attributes = new CraftControllableMobAttributes(this);
// 		this.actions = new CraftControllableMobActions(this);
// 		this.ai = new CraftControllableMobAI<E>(this);
// 	}
// 	
// 	private void disposedCall() throws IllegalStateException {
// 		throw new IllegalStateException("[ControllableMobsAPI] the ControllableMob is unassigned");
// 	}
// 	
// 	public void unassign(boolean resetAttributes) {
// 		if(this.entity==null) this.disposedCall();
// 		
// 		// component dispose
// 		this.actions.dispose();
// 		this.ai.dispose();
// 		this.attributes.dispose(resetAttributes);
// 		
// 		// component disposal
// 		this.actions = null;
// 		this.ai = null;
// 		this.attributes = null;
// 		
// 		// entity unassign
// 		this.nmsEntity = null;
// 		this.entity = null;
// 	}
// 	
// 	public ControllableMobActionManager getActionManager() {
// 		return this.actions.actionManager;
// 	}
// 	
// 	public void adjustMaximumNavigationDistance(double forDistance) {
// 		this.attributes.adjustMaximumNavigationDistance(forDistance);
// 	}
// 	
// 
// 	@Override
// 	public E getEntity() {
// 		return entity;
// 	}
// 
// 	@Override
// 	public ControllableMobAI<E> getAI() {
// 		if(this.ai==null) this.disposedCall();
// 		return this.ai;
// 	}
// 
// 	@Override
// 	public ControllableMobActions getActions() {
// 		if(this.actions==null) this.disposedCall();
// 		return this.actions;
// 	}
// 	
// 	@Override
//     public String toString() {
// 		if(this.entity==null) return "ControllableMob<[unassigned]>";
// 		else return "ControllableMob<"+this.entity.toString()+">";
//     }
// 
// 	@Override
// 	public ControllableMobAttributes getAttributes() {
// 		if(this.attributes==null) this.disposedCall();
// 		return this.attributes;
// 	}
// 
// }
// 
// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/implementation/nativeinterfaces/NativeInterfaces.java
// public final class NativeInterfaces {
// 	public static final NmsControllerJump CONTROLLERJUMP = new NmsControllerJump();
// 	public static final NmsControllerLook CONTROLLERLOOK = new NmsControllerLook();
// 	public static final NmsEntity ENTITY = new NmsEntity();
// 	public static final CBInterfaceJavaPluginLoader JAVAPLUGINLOADER = new CBInterfaceJavaPluginLoader();
// 	public static final NmsNavigation NAVIGATION = new NmsNavigation();
// 	public static final NmsInterfacePathfinderGoal PATHFINDERGOAL = new NmsInterfacePathfinderGoal();
// 	public static final NmsPathfinderGoalSelector PATHFINDERGOALSELECTOR = new NmsPathfinderGoalSelector();
// 	public static final NmsPathfinderGoalSelectorItem PATHFINDERGOALSELECTORITEM = new NmsPathfinderGoalSelectorItem();
// 	public static final CBInterfacePluginClassLoader PLUGINCLASSLOADER = new CBInterfacePluginClassLoader();
// 	public static final NmsWorld WORLD = new NmsWorld();
// 	public static final NmsIAttribute IATTRIBUTE = new NmsIAttribute();
// 	public static final NmsAttributeRanged ATTRIBUTERANGED = new NmsAttributeRanged();
// 	public static final NmsAttributeModifiable ATTRIBUTEMODIFIABLE = new NmsAttributeModifiable();
// 	public static final NmsAttributeModifier ATTRIBUTEMODIFIER = new NmsAttributeModifier();
// 	public static final NmsGenericAttributes GENERICATTRIBUTES = new NmsGenericAttributes();
// 	public static final NmsEntityInsentient ENTITYINSENTIENT = new NmsEntityInsentient();
// 	public static final NmsEntityTypes ENTITYTYPES = new NmsEntityTypes();
// 	
// 	private NativeInterfaces() {
// 		throw new AssertionError();
// 	}
// 
// }


import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import net.minecraft.server.v1_7_R1.EntityInsentient;
import net.minecraft.server.v1_7_R1.EntityLiving;
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftLivingEntity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.PluginClassLoader;
import de.ntcomputer.minecraft.controllablemobs.implementation.CraftControllableMob;
import de.ntcomputer.minecraft.controllablemobs.implementation.nativeinterfaces.NativeInterfaces;

package de.ntcomputer.minecraft.controllablemobs.api;





/**
 * This is a static class which lets you retrieve instances of {@link ControllableMob}.
 * 
 * @author Cybran
 * @version v5
 * 
 */
public final class ControllableMobs {
	private static final Map<LivingEntity,ControllableMob<?>> entities = new HashMap<LivingEntity,ControllableMob<?>>();
	
	static {
		onLoad();
	}
	
	private static void onLoad() {

// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/implementation/CraftControllableMob.java
// public class CraftControllableMob<E extends LivingEntity> implements ControllableMob<E> {
// 	private E entity;
// 	private CraftControllableMobAttributes attributes;
// 	private CraftControllableMobAI<E> ai;
// 	private CraftControllableMobActions actions;
// 	public EntityInsentient nmsEntity;
// 
// 	public CraftControllableMob(E entity, EntityInsentient notchEntity) {
// 		this.entity = entity;
// 		this.nmsEntity = notchEntity;
// 		this.attributes = new CraftControllableMobAttributes(this);
// 		this.actions = new CraftControllableMobActions(this);
// 		this.ai = new CraftControllableMobAI<E>(this);
// 	}
// 	
// 	private void disposedCall() throws IllegalStateException {
// 		throw new IllegalStateException("[ControllableMobsAPI] the ControllableMob is unassigned");
// 	}
// 	
// 	public void unassign(boolean resetAttributes) {
// 		if(this.entity==null) this.disposedCall();
// 		
// 		// component dispose
// 		this.actions.dispose();
// 		this.ai.dispose();
// 		this.attributes.dispose(resetAttributes);
// 		
// 		// component disposal
// 		this.actions = null;
// 		this.ai = null;
// 		this.attributes = null;
// 		
// 		// entity unassign
// 		this.nmsEntity = null;
// 		this.entity = null;
// 	}
// 	
// 	public ControllableMobActionManager getActionManager() {
// 		return this.actions.actionManager;
// 	}
// 	
// 	public void adjustMaximumNavigationDistance(double forDistance) {
// 		this.attributes.adjustMaximumNavigationDistance(forDistance);
// 	}
// 	
// 
// 	@Override
// 	public E getEntity() {
// 		return entity;
// 	}
// 
// 	@Override
// 	public ControllableMobAI<E> getAI() {
// 		if(this.ai==null) this.disposedCall();
// 		return this.ai;
// 	}
// 
// 	@Override
// 	public ControllableMobActions getActions() {
// 		if(this.actions==null) this.disposedCall();
// 		return this.actions;
// 	}
// 	
// 	@Override
//     public String toString() {
// 		if(this.entity==null) return "ControllableMob<[unassigned]>";
// 		else return "ControllableMob<"+this.entity.toString()+">";
//     }
// 
// 	@Override
// 	public ControllableMobAttributes getAttributes() {
// 		if(this.attributes==null) this.disposedCall();
// 		return this.attributes;
// 	}
// 
// }
// 
// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/implementation/nativeinterfaces/NativeInterfaces.java
// public final class NativeInterfaces {
// 	public static final NmsControllerJump CONTROLLERJUMP = new NmsControllerJump();
// 	public static final NmsControllerLook CONTROLLERLOOK = new NmsControllerLook();
// 	public static final NmsEntity ENTITY = new NmsEntity();
// 	public static final CBInterfaceJavaPluginLoader JAVAPLUGINLOADER = new CBInterfaceJavaPluginLoader();
// 	public static final NmsNavigation NAVIGATION = new NmsNavigation();
// 	public static final NmsInterfacePathfinderGoal PATHFINDERGOAL = new NmsInterfacePathfinderGoal();
// 	public static final NmsPathfinderGoalSelector PATHFINDERGOALSELECTOR = new NmsPathfinderGoalSelector();
// 	public static final NmsPathfinderGoalSelectorItem PATHFINDERGOALSELECTORITEM = new NmsPathfinderGoalSelectorItem();
// 	public static final CBInterfacePluginClassLoader PLUGINCLASSLOADER = new CBInterfacePluginClassLoader();
// 	public static final NmsWorld WORLD = new NmsWorld();
// 	public static final NmsIAttribute IATTRIBUTE = new NmsIAttribute();
// 	public static final NmsAttributeRanged ATTRIBUTERANGED = new NmsAttributeRanged();
// 	public static final NmsAttributeModifiable ATTRIBUTEMODIFIABLE = new NmsAttributeModifiable();
// 	public static final NmsAttributeModifier ATTRIBUTEMODIFIER = new NmsAttributeModifier();
// 	public static final NmsGenericAttributes GENERICATTRIBUTES = new NmsGenericAttributes();
// 	public static final NmsEntityInsentient ENTITYINSENTIENT = new NmsEntityInsentient();
// 	public static final NmsEntityTypes ENTITYTYPES = new NmsEntityTypes();
// 	
// 	private NativeInterfaces() {
// 		throw new AssertionError();
// 	}
// 
// }


// Path: src/main/java/de/ntcomputer/minecraft/controllablemobs/api/ControllableMobs.java
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import net.minecraft.server.v1_7_R1.EntityInsentient;
import net.minecraft.server.v1_7_R1.EntityLiving;
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftLivingEntity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.PluginClassLoader;
import de.ntcomputer.minecraft.controllablemobs.implementation.CraftControllableMob;
import de.ntcomputer.minecraft.controllablemobs.implementation.nativeinterfaces.NativeInterfaces;

package de.ntcomputer.minecraft.controllablemobs.api;





/**
 * This is a static class which lets you retrieve instances of {@link ControllableMob}.
 * 
 * @author Cybran
 * @version v5
 * 
 */
public final class ControllableMobs {
	private static final Map<LivingEntity,ControllableMob<?>> entities = new HashMap<LivingEntity,ControllableMob<?>>();
	
	static {
		onLoad();
	}
	
	private static void onLoad() {

		try {
