public void silentJoinMessenger(int messengerid, MapleMessengerCharacter target, int position) throws RemoteException { MapleMessenger messenger = WorldRegistryImpl.getInstance().getMessenger(messengerid); if (messenger == null) { throw new IllegalArgumentException("No messenger with the specified messengerid exists"); } messenger.silentAddMember(target, position); }
public void updateMessenger(int messengerid, String namefrom, int fromchannel) throws RemoteException { MapleMessenger messenger = WorldRegistryImpl.getInstance().getMessenger(messengerid); int position = messenger.getPositionByName(namefrom); for (int i : WorldRegistryImpl.getInstance().getChannelServer()) { ChannelWorldInterface cwi = WorldRegistryImpl.getInstance().getChannel(i); try { cwi.updateMessenger(messenger, namefrom, position, fromchannel); } catch (RemoteException e) { WorldRegistryImpl.getInstance().deregisterChannelServer(i); } } }
public void joinMessenger( int messengerid, MapleMessengerCharacter target, String from, int fromchannel) throws RemoteException { MapleMessenger messenger = WorldRegistryImpl.getInstance().getMessenger(messengerid); if (messenger == null) { throw new IllegalArgumentException("No messenger with the specified messengerid exists"); } messenger.addMember(target); for (int i : WorldRegistryImpl.getInstance().getChannelServer()) { ChannelWorldInterface cwi = WorldRegistryImpl.getInstance().getChannel(i); try { cwi.addMessengerPlayer(messenger, from, fromchannel, target.getPosition()); } catch (RemoteException e) { WorldRegistryImpl.getInstance().deregisterChannelServer(i); } } }
public void leaveMessenger(int messengerid, MapleMessengerCharacter target) throws RemoteException { MapleMessenger messenger = WorldRegistryImpl.getInstance().getMessenger(messengerid); if (messenger == null) { throw new IllegalArgumentException("No messenger with the specified messengerid exists"); } int position = messenger.getPositionByName(target.getName()); messenger.removeMember(target); for (int i : WorldRegistryImpl.getInstance().getChannelServer()) { ChannelWorldInterface cwi = WorldRegistryImpl.getInstance().getChannel(i); try { cwi.removeMessengerPlayer(messenger, position); } catch (RemoteException e) { WorldRegistryImpl.getInstance().deregisterChannelServer(i); } } }