mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Fix loading channels (for real this time)
This commit is contained in:
1 parent
9c4187124a
commit
f8c465925a
3 files changed
+12
-10
No files matched your search
+9
-2
@@ -12,6 +12,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
public class ChannelManager {
|
||||
|
||||
@@ -29,6 +30,7 @@ public class ChannelManager {
|
||||
this.carbonChat = carbonChat;
|
||||
this.registry = new ChannelRegistry();
|
||||
|
||||
this.carbonChat.logger().info("Loading channels!");
|
||||
this.reload();
|
||||
}
|
||||
|
||||
@@ -84,8 +86,13 @@ public class ChannelManager {
|
||||
}
|
||||
|
||||
private void reload() {
|
||||
for (final ChannelOptions options : this.carbonChat.carbonSettings().channelOptions()) {
|
||||
final ChatChannel channel = this.loadChannel(options);
|
||||
this.carbonChat.logger().info("Channels found: " +
|
||||
this.carbonChat.channelSettings().channelOptions().size());
|
||||
|
||||
for (final Map.Entry<String, ChannelOptions> options :
|
||||
this.carbonChat.channelSettings().channelOptions().entrySet()) {
|
||||
|
||||
final ChatChannel channel = this.loadChannel(options.getValue());
|
||||
|
||||
if (channel != null) {
|
||||
this.registerChannel(channel);
|
||||
|
||||
Reference in new issue
Block a user