Bump adventure and fix startup issues

This commit is contained in:
Draycia committed 2020-10-16 22:04:10 -07:00
1 parent 61a2b4cd0f
commit 8e7a625ad6
5 files changed
+19 -12

No files matched your search

@@ -7,7 +7,6 @@ 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;
@@ -101,7 +100,6 @@ public class ChannelManager {
if (channel instanceof TextChannel) {
prefix = ((TextChannel) channel).messagePrefix();
new AliasedChannelCommand(this.carbonChat.commandManager(), (TextChannel) channel);
}
if (prefix != null && !prefix.trim().isEmpty()) {
@@ -16,7 +16,7 @@ import java.util.stream.StreamSupport;
public final class PlayerUserArgument<C> extends CommandArgument<C, PlayerUser> {
private PlayerUserArgument(final boolean required) {
super(required, "channel", PlayerUserArgument::parser,
super(required, "user", PlayerUserArgument::parser,
"",
PlayerUser.class, PlayerUserArgument::suggestions);
}
@@ -1,7 +1,11 @@
package net.draycia.carbon.common.commands.misc;
import cloud.commandframework.CommandManager;
import net.draycia.carbon.api.CarbonChatProvider;
import net.draycia.carbon.api.channels.ChatChannel;
import net.draycia.carbon.api.channels.TextChannel;
import net.draycia.carbon.api.users.CarbonUser;
import net.draycia.carbon.common.commands.AliasedChannelCommand;
import net.draycia.carbon.common.commands.ChannelCommand;
import net.draycia.carbon.common.commands.ChannelListCommand;
import net.draycia.carbon.common.commands.ChatReloadCommand;
@@ -41,6 +45,12 @@ public final class CommandRegistrar {
new SpyChannelCommand(commandManager);
new SudoChannelCommand(commandManager);
new ToggleCommand(commandManager);
for (final ChatChannel channel : CarbonChatProvider.carbonChat().channelRegistry()) {
if (channel instanceof TextChannel) {
new AliasedChannelCommand(commandManager, (TextChannel) channel);
}
}
}
}