package de.eightbitboy.ecorealms.control;

public class ControlMapping {
	private static final ControlMapping INSTANCE = new ControlMapping();

	public static ControlMapping getInstance() {
		return INSTANCE;
	}

	private ControlMapping() {
	}
}

@@ -40,205 +40,580 @@
 l;%0A%0A
-public class ControlMapping %7B%0A%09private static final ControlMapping INSTANCE = new ControlMapping();%0A%0A%09public static ControlMapping getInstance() %7B%0A%09%09return INSTANCE;%0A%09%7D%0A%0A%09private ControlMapping() %7B
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class ControlMapping %7B%0A%0A%09enum Action %7B%0A%09%09LMB,%0A%09%09RMB%0A%09%7D%0A%0A%09public interface ActionListener %7B%0A%09%09void action(Action action);%0A%09%7D%0A%0A%09private static final ControlMapping INSTANCE = new ControlMapping();%0A%0A%09private List%3CActionListener%3E listeners = new ArrayList%3CActionListener%3E();%0A%0A%09private ControlMapping() %7B%0A%09%7D%0A%0A%09public static ControlMapping getInstance() %7B%0A%09%09return INSTANCE;%0A%09%7D%0A%0A%09public static void subscribe(ActionListener listener) %7B%0A%09%09INSTANCE.listeners.add(listener);%0A%09%7D%0A%0A%09public void fireAction(Action action) %7B%0A%09%09
 %0A%09%7D%0A

Save progress