if ((MapEditorTab.ID.equals(id) || EventsEditorTab.ID.equals(id) || EventTab.ID.equals(id)) && parameters.containsKey("map")) {
RubyObject map = RGSS1Helper.get(p, Type.MAP).get(Integer.valueOf(parameters.get("map"))).getObject();
// add tab
if (EventsEditorTab.ID.equals(id)) {
return new EventsEditorTab(p, map);
}
if (EventTab.ID.equals(id)) {
// search for event
RubyHash events = (RubyHash) map.getInstanceVariable("@events");
int eid = Integer.valueOf(parameters.get("event"));