package common.entity;

import java.util.Map;

import common.collect.Maps;

public enum EntityType {
	OBJECT("Object", "Objekt"),
	VEHICLE("Vehicle", "Fahrzeug"),
	PROJECTILE("Projectile", "Projektil"),
	EXPLOSIVE("Explosive", "Sprengstoff"),
	ANIMAL("Animal", "Tier"),
	NPC("NPC", "NPC");
	
	private static final Map<String, EntityType> LOOKUP = Maps.newHashMap();
	
	private final String name;
	private final String display;
	
	private EntityType(String name, String display) {
		this.name = name;
		this.display = display;
	}

	public String getName() {
		return this.name;
	}

	public String getDisplay() {
		return this.display;
	}

	public static EntityType getByName(String name) {
		return LOOKUP.get(name);
	}
	
	static {
		for(EntityType type : values()) {
			LOOKUP.put(type.name, type);
		}
	}
}
