Skip to main content

Social Snapshots

com.n3plugins.sdk.social owns social read surfaces for overlays, coordination, and diagnostics. These APIs do not send chat, join channels, rank members, or dispatch gameplay actions.

FriendsApi

FriendsApi reads the current friends-chat state.

Optional<FriendsChatSnapshot> chat = FriendsApi.friendsChat();
boolean present = FriendsApi.isInFriendsChat("Player name");

Methods:

  • friendsChat() - returns a FriendsChatSnapshot when the client has a FriendsChatManager, otherwise empty.
  • isInFriendsChat(name) - true when the current friends-chat manager can find the player by name.

FriendsChatSnapshot contains owner, chat name, local rank, kick rank, and an immutable member list. FriendChatMemberSnapshot contains member name, world, and rank.

ClanApi

ClanApi reads RuneLite clan channels.

Optional<ClanSnapshot> clan = ClanApi.clanChannel();
Optional<ClanSnapshot> guest = ClanApi.guestClanChannel();

Methods:

  • clanChannel() - snapshot of the primary clan channel, or empty when absent.
  • guestClanChannel() - snapshot of the guest clan channel, or empty when absent.

ClanSnapshot contains the channel name and immutable member list. ClanMemberSnapshot contains member name, world, and ClanRank.

ChatApi

ChatApi exposes a small bounded recent-message buffer.

List<ChatMessageSnapshot> recent = ChatApi.recentMessages();

Methods:

  • record(event) - records a RuneLite ChatMessage event into the buffer.
  • recentMessages() - returns immutable recent messages, newest first.
  • clearRecentMessages() - clears the buffer.

ChatMessageSnapshot contains message type, display name, sender, raw message text, and receipt timestamp. The buffer retains at most 100 messages.

ChatApi.record(...) is event-ingestion/runtime-facing. PacketUtils wiring feeds it through ChatMessageListener; most callers should consume recentMessages() rather than calling record(...) directly.