public boolean isMembersOnly() {
        return membersOnly;
    }
Returns true if the room requires an invitation to enter. That is if the room is
members-only.

@return true if the room requires an invitation to enter.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java