Пример #1
0
 public boolean processMessage(Message message) {
   if (message.args[0].hasStrValue(identity)) {
     if (message.hasName("setName") && message.arity == 2) {
       String name = message.args[1].strValue();
       setName(name);
       handler.setCommandMode(false);
       return true;
     } else if (message.hasName("closeModelBrowser") && message.arity == 1) {
       closeModelBrowser();
       return true;
     } else return broadcastCommand(message);
   } else return broadcastCommand(message);
 }
Пример #2
0
 public boolean processMessage(Message message) {
   if (message.arity > 0) {
     if (message.hasName("delete")
         && message.args[0].hasStrValue(identity)
         && message.arity == 1) {
       delete();
       return true;
     }
   }
   return false;
 }