mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 14:38:49 +00:00
Attempt to fix whisper exception and formatType checkstyle
This commit is contained in:
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;
|
return this.whisperOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NonNull FormatType getFormatType() {
|
public @NonNull FormatType formatType() {
|
||||||
return 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.messaging.MessageService;
|
||||||
import net.draycia.carbon.api.users.CarbonUser;
|
import net.draycia.carbon.api.users.CarbonUser;
|
||||||
import net.draycia.carbon.api.users.PlayerUser;
|
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.channels.ChannelManager;
|
||||||
import net.draycia.carbon.common.config.KeySerializer;
|
import net.draycia.carbon.common.config.KeySerializer;
|
||||||
import net.draycia.carbon.common.config.SoundSerializer;
|
import net.draycia.carbon.common.config.SoundSerializer;
|
||||||
@@ -126,7 +125,7 @@ public final class CarbonChatBukkit extends JavaPlugin implements CarbonChat {
|
|||||||
|
|
||||||
// Setup Adventure
|
// Setup Adventure
|
||||||
final BukkitAudiences audiences = BukkitAudiences.create(this);
|
final BukkitAudiences audiences = BukkitAudiences.create(this);
|
||||||
this.messageProcessor = new AdventureManager(audiences, this.carbonSettings.getFormatType());
|
this.messageProcessor = new AdventureManager(audiences, this.carbonSettings.formatType());
|
||||||
|
|
||||||
// Initialize managers
|
// Initialize managers
|
||||||
this.channelManager = new ChannelManager(this);
|
this.channelManager = new ChannelManager(this);
|
||||||
|
|||||||
+2
-2
@@ -55,7 +55,7 @@ public class MessageCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!sender.hasPermission("carbonchat.msgtoggle.bypass")) {
|
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);
|
final UserChannelSettings senderSettings = sender.channelSettings(senderWhisperChannel);
|
||||||
|
|
||||||
if (senderSettings.ignored()) {
|
if (senderSettings.ignored()) {
|
||||||
@@ -64,7 +64,7 @@ public class MessageCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ChatChannel receiverWhisperChannel = this.carbonChat.channelRegistry().get("whisper");
|
final ChatChannel receiverWhisperChannel = new CarbonWhisperChannel(receiver, sender);
|
||||||
final UserChannelSettings receiverSettings = sender.channelSettings(receiverWhisperChannel);
|
final UserChannelSettings receiverSettings = sender.channelSettings(receiverWhisperChannel);
|
||||||
|
|
||||||
if (receiverSettings.ignored()) {
|
if (receiverSettings.ignored()) {
|
||||||
|
|||||||
Reference in new issue
Block a user