}
}
}
private void sendTakeSlotMessage(PlayerSlot slot) {
TakeSlotMessage msg = new TakeSlotMessage(client.getGame().getGameId(), slot.getNumber(), slot.getNickname());
msg.setAiClassName(slot.getAiClassName());
if (slot.getAiClassName() != null) {
try {
EnumSet<Expansion> supported = (EnumSet<Expansion>) Class.forName(slot.getAiClassName()).getMethod("supportedExpansions").invoke(null);
msg.setSupportedExpansions(supported.toArray(new Expansion[0]));
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
client.getConnection().send(msg);