mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Remove unused ChatChannel#filterRecipients method
This commit is contained in:
3 files changed
-31
No files matched your search
@@ -20,7 +20,6 @@
|
||||
package net.draycia.carbon.api.channels;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||
import net.draycia.carbon.api.util.ChatComponentRenderer;
|
||||
@@ -70,16 +69,6 @@ public interface ChatChannel extends Keyed, ChatComponentRenderer {
|
||||
*/
|
||||
List<Audience> recipients(CarbonPlayer sender);
|
||||
|
||||
/**
|
||||
* Filters the given recipients and removes entries that may not see messages in this channel.
|
||||
*
|
||||
* @param sender the sender of messages
|
||||
* @param recipients the recipients
|
||||
* @return the recipients that may receive messages
|
||||
* @since 2.0.0
|
||||
*/
|
||||
Set<CarbonPlayer> filterRecipients(CarbonPlayer sender, Set<CarbonPlayer> recipients);
|
||||
|
||||
/**
|
||||
* Messages will be sent in this channel if they start with this prefix.
|
||||
*
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import net.draycia.carbon.api.CarbonChat;
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||
@@ -133,13 +132,6 @@ public final class BasicChatChannel implements ChatChannel {
|
||||
return recipients;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<CarbonPlayer> filterRecipients(final CarbonPlayer sender, final Set<CarbonPlayer> recipients) {
|
||||
recipients.removeIf(it -> !this.hearingPermitted(it).permitted());
|
||||
|
||||
return recipients;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Key key() {
|
||||
return this.key;
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import net.draycia.carbon.api.CarbonServer;
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
@@ -182,17 +181,6 @@ public final class ConfigChatChannel implements ChatChannel {
|
||||
return recipients;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<CarbonPlayer> filterRecipients(final CarbonPlayer sender, final Set<CarbonPlayer> recipients) {
|
||||
try {
|
||||
recipients.removeIf(it -> !this.hearingPermitted(it).permitted());
|
||||
} catch (final UnsupportedOperationException ignored) {
|
||||
|
||||
}
|
||||
|
||||
return recipients;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Key key() {
|
||||
return Objects.requireNonNull(this.key);
|
||||
|
||||
Reference in new issue
Block a user