Attempt to fix whisper exception and formatType checkstyle

This commit is contained in:
Draycia committed 2020-10-18 04:29:06 -07:00
1 parent c4387ca3b4
commit 14c37d7f78
3 files changed
+5 -6

No files matched your search

@@ -153,7 +153,7 @@ public final class CarbonSettings {
return this.whisperOptions;
}
public @NonNull FormatType getFormatType() {
return formatType;
public @NonNull FormatType formatType() {
return this.formatType;
}
}
@@ -25,7 +25,6 @@ import net.draycia.carbon.api.config.StorageType;
import net.draycia.carbon.api.messaging.MessageService;
import net.draycia.carbon.api.users.CarbonUser;
import net.draycia.carbon.api.users.PlayerUser;
import net.draycia.carbon.api.adventure.FormatType;
import net.draycia.carbon.common.channels.ChannelManager;
import net.draycia.carbon.common.config.KeySerializer;
import net.draycia.carbon.common.config.SoundSerializer;
@@ -126,7 +125,7 @@ public final class CarbonChatBukkit extends JavaPlugin implements CarbonChat {
// Setup Adventure
final BukkitAudiences audiences = BukkitAudiences.create(this);
this.messageProcessor = new AdventureManager(audiences, this.carbonSettings.getFormatType());
this.messageProcessor = new AdventureManager(audiences, this.carbonSettings.formatType());
// Initialize managers
this.channelManager = new ChannelManager(this);
@@ -55,7 +55,7 @@ public class MessageCommand {
}
if (!sender.hasPermission("carbonchat.msgtoggle.bypass")) {
final ChatChannel senderWhisperChannel = this.carbonChat.channelRegistry().get("whisper");
final ChatChannel senderWhisperChannel = new CarbonWhisperChannel(sender, receiver);
final UserChannelSettings senderSettings = sender.channelSettings(senderWhisperChannel);
if (senderSettings.ignored()) {
@@ -64,7 +64,7 @@ public class MessageCommand {
return;
}
final ChatChannel receiverWhisperChannel = this.carbonChat.channelRegistry().get("whisper");
final ChatChannel receiverWhisperChannel = new CarbonWhisperChannel(receiver, sender);
final UserChannelSettings receiverSettings = sender.channelSettings(receiverWhisperChannel);
if (receiverSettings.ignored()) {