package de.eightbitboy.ecorealms.control;

import java.util.ArrayList;
import java.util.List;

public class ControlMapping {

	enum Action {
		LMB,
		RMB
	}

	public interface ActionListener {
		void action(Action action);
	}

	private static final ControlMapping INSTANCE = new ControlMapping();

	private List<ActionListener> listeners = new ArrayList<ActionListener>();

	private ControlMapping() {
	}

	public static ControlMapping getInstance() {
		return INSTANCE;
	}

	public static void subscribe(ActionListener listener) {
		INSTANCE.listeners.add(listener);
	}

	public void fireAction(Action action) {
		
	}
}

@@ -608,14 +608,89 @@
 on) %7B%0A%09%09
+for (ActionListener listener : listeners) %7B%0A%09%09%09listener.action(action);%0A%09%09%7D
 %0A%09%7D%0A%7D%0A

Call all listeners