public void joinSession(IEventDispatcher dispatcher) { User user = MojaveApplicationData.getSession().getUser(); if (!users.contains(user)) { users.add(user); dispatcher.dispatch(new ProjectSessionJoinEvent(sessionId, user), EventScope.UNIVERSAL); } }
public void leaveSession(IEventDispatcher dispatcher) { User user = MojaveApplicationData.getSession().getUser(); if (users.remove(user)) dispatcher.dispatch(new ProjectSessionLeaveEvent(sessionId, user), EventScope.UNIVERSAL); }