diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0804b49..d6e659b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,12 +4,8 @@ - @@ -484,7 +479,8 @@ - diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/Bot.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/Bot.java index c7ee52f..a891c73 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/Bot.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/Bot.java @@ -28,7 +28,7 @@ public class Bot { @Getter private final Configuration config; - @Getter private List allBots; + @Getter private List bots; @Getter private String username; @@ -64,14 +64,14 @@ public class Bot { @Getter private ExploitsPlugin exploits; @Getter private FilterPlugin filter; - public Bot (Configuration.BotOption botOption, List allBots, Configuration config) { + public Bot (Configuration.BotOption botOption, List bots, Configuration config) { this.host = botOption.host; this.port = botOption.port; this.options = botOption; if (options.reconnectDelay == -1) options.reconnectDelay = config.reconnectDelay; - this.allBots = allBots; + this.bots = bots; this.config = config; diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java index a6ff9ee..d8f60db 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java @@ -12,7 +12,7 @@ import java.util.ArrayList; import java.util.List; public class Main { - public static final List allBots = new ArrayList<>(); + public static final List bots = new ArrayList<>(); public static void main(String[] args) throws IOException { final File file = new File("config.yml"); @@ -65,10 +65,10 @@ public class Main { } for (Configuration.BotOption botOption : botsOptions) { - final Bot bot = new Bot(botOption, allBots, config); - allBots.add(bot); + final Bot bot = new Bot(botOption, bots, config); + bots.add(bot); } - new ConsolePlugin(allBots, config, jda); + new ConsolePlugin(bots, config, jda); } } \ No newline at end of file diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/NetMessageCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/NetMessageCommand.java index ea5da94..3c6c362 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/NetMessageCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/NetMessageCommand.java @@ -39,7 +39,7 @@ public class NetMessageCommand implements Command { public Component execute(CommandContext context, String[] args, String[] fullArgs) { final Bot bot = context.bot(); - final List bots = bot.allBots(); + final List bots = bot.bots(); final String hostAndPort = bot.host() + ":" + bot.port(); diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/DiscordPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/DiscordPlugin.java index bd08136..bd55ae8 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/DiscordPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/DiscordPlugin.java @@ -40,7 +40,7 @@ public class DiscordPlugin { this.servers = options.servers(); this.jda = jda; - for (Bot bot : Main.allBots) { + for (Bot bot : Main.bots) { String channelId = servers.get(bot.host() + ":" + bot.port()); bot.addListener(new Bot.Listener() { diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/TrustedPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/TrustedPlugin.java index 498d458..f09b8dd 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/TrustedPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/TrustedPlugin.java @@ -23,7 +23,7 @@ public class TrustedPlugin extends PlayersPlugin.PlayerListener { } public void broadcast (Component message, UUID exceptTarget) { - for (Bot bot : bot.allBots()) { + for (Bot bot : bot.bots()) { if (!bot.loggedIn()) continue; bot.logger().custom(Component.text("Trusted Broadcast").color(NamedTextColor.AQUA), message);