Skip to content

Commit

Permalink
Adjust docs and replace calls to deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Sep 26, 2024
1 parent 07075c4 commit 731afc9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ default List<Audience> recipients(final CarbonPlayer sender) {
}

/**
* Returns a list of all recipients that will receive messages from the sender.
* Returns the {@link RecipientsResolver} for this channel. The return value is not cached,
* and {@link ChannelPermissions#speechPermitted(CarbonPlayer)} is checked before
* invoking this method.
*
* @return the recipients resolver
* @since 3.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private Builder(final CarbonServer server) {

/**
* Includes online players matching the predicate in the resolved recipients. Adding multiple predicates
* will include players matching any one of the predicate.
* will include players matching any one of the predicates.
*
* @param filter player filter
* @return this builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected ChatListenerInternal(
final List<KeyedRenderer> renderers = new ArrayList<>();
renderers.add(KeyedRenderer.keyedRenderer(Key.key("carbon", "default"), channel));

final List<Audience> recipients = channel.recipients(sender);
final List<Audience> recipients = channel.recipientsResolver().recipients(sender);

final var chatEvent = new CarbonChatEventImpl(sender, message, recipients, renderers, channel, signedMessage);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private boolean handleMessagePacket(final ChatMessagePacket messagePacket) {

final List<KeyedRenderer> renderers = new ArrayList<>();

final List<Audience> recipients = channel.recipients(sender);
final List<Audience> recipients = channel.recipientsResolver().recipients(sender);
final CarbonChatEventImpl chatEvent = new CarbonChatEventImpl(sender, messagePacket.message(), recipients, renderers, channel, null, false);
this.events.emit(chatEvent);

Expand Down

0 comments on commit 731afc9

Please sign in to comment.