@SuppressWarnings("unchecked")
	private static <T extends EnumCreatable> T getEnumVal(int id, Class<T> enumClass){
		try {
			Method getVals = enumClass.getMethod("values");
			T[] poss = (T[]) getVals.invoke(null, new Object[0]);
			for(T b : poss){
				if(b.getValue() == id){
					return b;
				}
			}
			return poss[0];
		} catch (SecurityException e) {
		} catch (NoSuchMethodException e) {
		} catch (IllegalArgumentException e) {
		} catch (IllegalAccessException e) {
		} catch (InvocationTargetException e) {
		}
		return null;
	}