mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 22:16:22 +00:00
Various whisper changes / fixes (#93)
* Fix persisting whisper channel * Fix whisper channel name/key
This commit is contained in:
1 parent
13ac18bb36
commit
227a85e567
3 files changed
+12
-5
No files matched your search
@@ -3,6 +3,7 @@ package net.draycia.carbon.storage;
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.users.ChatUser;
|
||||
import net.draycia.carbon.api.users.UserChannelSettings;
|
||||
import net.draycia.carbon.common.channels.CarbonWhisperChannel;
|
||||
import net.draycia.carbon.util.FunctionalityConstants;
|
||||
import io.github.leonardosnt.bungeechannelapi.BungeeChannelApi;
|
||||
import net.draycia.carbon.CarbonChatBukkit;
|
||||
@@ -151,6 +152,13 @@ public class BukkitChatUser implements ChatUser, ForwardingAudience {
|
||||
}
|
||||
|
||||
if (this.selectedChannelKey != null) {
|
||||
if (this.selectedChannelKey.equals("whisper") && this.replyTarget != null) {
|
||||
this.selectedChannel = new CarbonWhisperChannel(this,
|
||||
this.carbonChat.userService().wrap(this.replyTarget));
|
||||
|
||||
return this.selectedChannel;
|
||||
}
|
||||
|
||||
return this.carbonChat.channelRegistry().channelOrDefault(this.selectedChannelKey);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user