Exemplo n.º 1
0
 public void kick(Player p, String name) {
   for (Room r : clanRooms) {
     if (r.getName().equalsIgnoreCase(p.clanRoom)) {
       r.kick(p, name);
     }
   }
 }
Exemplo n.º 2
0
 public void sendMessage(Player p, String message) {
   for (Room r : clanRooms) {
     if (r.getName().equalsIgnoreCase(p.clanRoom)) {
       if (message.startsWith("kick ")) {
         r.kick(p, message.replace("kick ", ""));
       } else if (message.startsWith("ban")) {
         r.ban(p, message.replace("ban ", ""));
       } else if (message.startsWith("unban")) {
         r.unban(p, message.replace("unban ", ""));
       } else {
         r.sendMessage(p, message);
       }
     }
   }
 }