package com.hyperfresh.mchyperchat;

import java.util.HashMap;
import java.util.Map;

public class ThemeManager
{
	private final Map<String, Theme> themes = new HashMap<>();

	private final Map<Class<? extends Theme>, Theme> themesByClass = new HashMap<>();

	public void add(Theme theme)
	{
		themes.put(theme.getID(), theme);
		themesByClass.put(theme.getClass(), theme);
	}

	public Theme get(String id)
	{
		return themes.get(id);
	}

	public <E extends Theme> E get(Class<E> themeClass)
	{
		return (E)themesByClass.get(themeClass);
	}
}

@@ -252,16 +252,73 @@
 p%3C%3E();%0A%0A
+%09public ThemeManager()%0A%09%7B%0A%09%09add(new VanillaTheme());%0A%09%7D%0A%0A
 %09public 

add constructor to ThemeManager