mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 06:28:53 +00:00
Alert when returned channel is null
This commit is contained in:
1 file changed
+6
-1
@@ -175,7 +175,12 @@ public class CarbonChannelRegistry implements ChannelRegistry, DefaultedRegistry
|
|||||||
|
|
||||||
final @Nullable ChatChannel chatChannel = this.registerChannelFromPath(path);
|
final @Nullable ChatChannel chatChannel = this.registerChannelFromPath(path);
|
||||||
|
|
||||||
if (chatChannel != null && chatChannel.shouldRegisterCommands()) {
|
if (chatChannel == null) {
|
||||||
|
this.logger.warn("Failed to load channel from file [" + fileName + "]");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chatChannel.shouldRegisterCommands()) {
|
||||||
this.registerChannelCommands(chatChannel, commandManager);
|
this.registerChannelCommands(chatChannel, commandManager);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user