Various bug fixes

This commit is contained in:
Draycia committed 2020-09-26 03:30:52 -07:00
1 parent 221a88766e
commit 8de4305e91
3 files changed
+7 -10

No files matched your search

@@ -83,7 +83,7 @@ public final class CarbonChatBukkit extends JavaPlugin implements CarbonChat {
private static final int BSTATS_PLUGIN_ID = 8720;
private ChannelRegistry channelRegistry;
private ChannelManager channelManager;
private AdventureManager messageProcessor;
private CommandSettingsRegistry commandSettings;
@@ -124,9 +124,7 @@ public final class CarbonChatBukkit extends JavaPlugin implements CarbonChat {
this.messageProcessor = new AdventureManager(BukkitAudiences.create(this), FormatType.MINIMESSAGE); // TODO: get format type from config
// Initialize managers
this.channelRegistry = new ChannelRegistry();
new ChannelManager(this);
this.channelManager = new ChannelManager(this);
// Handle messaging service
final MessagingType messagingType = this.carbonSettings().messagingType();
@@ -356,7 +354,7 @@ public final class CarbonChatBukkit extends JavaPlugin implements CarbonChat {
@Override
public @NonNull ChannelRegistry channelRegistry() {
return this.channelRegistry;
return this.channelManager.registry();
}
@Override
@@ -57,7 +57,7 @@ public class BukkitChatUser implements ChatUser, ForwardingAudience {
private transient UUID replyTarget = null;
public BukkitChatUser() {
this.carbonChat = (CarbonChatBukkit) Bukkit.getPluginManager().getPlugin("CarbonChat");
this.carbonChat = (CarbonChatBukkit) Bukkit.getPluginManager().getPlugin("CarbonChat-Bukkit");
}
public BukkitChatUser(final @NonNull UUID uuid) {
@@ -68,7 +68,7 @@ public class BukkitChatUser implements ChatUser, ForwardingAudience {
@Override
@NonNull
public Iterable<@NonNull ? extends Audience> audiences() {
return Collections.singleton(this);
return Collections.singleton(this.carbonChat.messageProcessor().audiences().player(this.uuid()));
}
@Override
@@ -231,7 +231,7 @@ public class BukkitChatUser implements ChatUser, ForwardingAudience {
return this.ignoredUsers;
}
LuckPerms luckPerms = LuckPermsProvider.get();
private transient final LuckPerms luckPerms = LuckPermsProvider.get();
@Override
public boolean hasGroup(final @NonNull String groupName) {