mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 06:28:54 +00:00
added empty recipients message
This commit is contained in:
1 parent
4a53bc85b5
commit
6e1bd3bf68
2 files changed
+10
-1
No files matched your search
@@ -23,6 +23,7 @@ import com.google.inject.Inject;
|
||||
import net.draycia.carbon.api.CarbonChat;
|
||||
import net.draycia.carbon.api.events.CarbonChatEvent;
|
||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||
import net.draycia.carbon.common.messages.CarbonMessages;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
|
||||
@@ -31,7 +32,8 @@ public class RadiusListener {
|
||||
|
||||
@Inject
|
||||
public RadiusListener(
|
||||
final CarbonChat carbonChat
|
||||
final CarbonChat carbonChat,
|
||||
final CarbonMessages carbonMessages
|
||||
) {
|
||||
carbonChat.eventHandler().subscribe(CarbonChatEvent.class, 0, false, event -> {
|
||||
if (event.chatChannel() == null) {
|
||||
@@ -74,6 +76,10 @@ public class RadiusListener {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
if (!event.recipients().isEmpty()) return;
|
||||
|
||||
carbonMessages.emptyRecipients(event.sender());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,9 @@ public interface CarbonMessages {
|
||||
@Message("channel.change")
|
||||
void changedChannels(final Audience audience, final String channel);
|
||||
|
||||
@Message("channel.radius.empty_recipients")
|
||||
void emptyRecipients(final Audience audience);
|
||||
|
||||
/*
|
||||
* =============================================================
|
||||
* =========================== Mutes ===========================
|
||||
|
||||
Reference in new issue
Block a user