public void kick(Player p, String name) { for (Room r : clanRooms) { if (r.getName().equalsIgnoreCase(p.clanRoom)) { r.kick(p, name); } } }
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); } } } }