Complete some TODOs

This commit is contained in:
Draycia committed 2020-10-15 02:14:52 -07:00
1 parent 548955134e
commit 4d547f80c7
27 files changed
+155 -67

No files matched your search

@@ -182,7 +182,7 @@ public class CarbonChatChannel implements TextChannel {
"phase", Long.toString(System.currentTimeMillis() % 25),
"message", consoleFormatEvent.message());
// TODO: add ConsoleUser to users map
// TODO: add ConsoleUser to users map. Requires "users" to be CarbonUser and not PlayerUser.
final ChatComponentEvent consoleEvent = new ChatComponentEvent(user, null, this, consoleFormat,
consoleFormatEvent.message());
@@ -7,6 +7,7 @@ import net.draycia.carbon.api.channels.ChannelRegistry;
import net.draycia.carbon.api.channels.ChatChannel;
import net.draycia.carbon.api.events.misc.CarbonEvents;
import net.draycia.carbon.api.events.ChannelRegisterEvent;
import net.draycia.carbon.common.commands.AliasedChannelCommand;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
@@ -96,11 +97,11 @@ public class ChannelManager {
if (channel != null) {
this.registerChannel(channel);
// TODO: register AliasedChannelCommand for each channel
String prefix = null;
if (channel instanceof TextChannel) {
prefix = ((TextChannel) channel).messagePrefix();
new AliasedChannelCommand(this.carbonChat.commandManager(), (TextChannel) channel);
}
if (prefix != null && !prefix.trim().isEmpty()) {
@@ -108,7 +109,6 @@ public class ChannelManager {
} else {
prefix = "";
}
this.carbonChat.logger().info("Registering channel: " + prefix + channel.name());
}
}