From a21db7af1bab703bb64afa024f00c158c7c63333 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 1 Jul 2023 19:56:55 +0700 Subject: [PATCH] i forgor i hardcoded it --- .../land/chipmunk/chayapak/chomens_bot/Configuration.java | 6 ++++++ .../chipmunk/chayapak/chomens_bot/plugins/EvalPlugin.java | 2 +- src/main/resources/default-config.yml | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java index cd8707d..eb93a36 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java @@ -27,6 +27,8 @@ public class Configuration { @Getter public List trusted = new ArrayList<>(); @Getter public SelfCare selfCare = new SelfCare(); + @Getter public Eval eval = new Eval(); + @Getter public BotOption[] bots = new BotOption[]{}; public static class ConsolePrefixes { @@ -109,6 +111,10 @@ public class Configuration { @Getter public boolean username = true; } + public static class Eval { + @Getter public String address = "ws://localhost:3069"; + } + public static class BotOption { @Getter public String host; @Getter public int port; diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/EvalPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/EvalPlugin.java index 46068d8..dce8069 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/EvalPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/EvalPlugin.java @@ -23,7 +23,7 @@ public class EvalPlugin { public EvalPlugin (Bot bot) { try { - socket = IO.socket("ws://localhost:3069"); + socket = IO.socket(bot.config().eval().address()); } catch (Exception e) { e.printStackTrace(); } diff --git a/src/main/resources/default-config.yml b/src/main/resources/default-config.yml index 92dab1e..660c418 100644 --- a/src/main/resources/default-config.yml +++ b/src/main/resources/default-config.yml @@ -81,6 +81,10 @@ selfCare: enabled: true prefix: '&8[&eChomeNS Bot&8]' username: true # MIGHT cause problem(s) if set to false (not tested,.,.) + +eval: + address: 'ws://localhost:3069' + bots: # username - optional, if not specified it will just use a random username # kaboom - defaults to false