diff --git a/pom.xml b/pom.xml
index 995e5be..721c5b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,9 +10,11 @@
pom
- zander-proxy
+ zander-waterfall
+ zander-velocity
zander-hub
zander-auth
+ zander-bridge
diff --git a/zander-auth/pom.xml b/zander-auth/pom.xml
index ca571ee..b6dd137 100644
--- a/zander-auth/pom.xml
+++ b/zander-auth/pom.xml
@@ -10,7 +10,7 @@
4.0.0
zander-auth
- 1.0
+ 1.3.0
@@ -48,7 +48,7 @@
com.jayway.jsonpath
json-path
- 2.8.0
+ [2.9.0,)
com.google.code.gson
diff --git a/zander-bridge/pom.xml b/zander-bridge/pom.xml
new file mode 100644
index 0000000..62717f5
--- /dev/null
+++ b/zander-bridge/pom.xml
@@ -0,0 +1,67 @@
+
+
+
+ zander
+ org.modularsoft
+ 1.0
+
+ 4.0.0
+
+ zander-bridge
+ 1.3.0
+
+
+
+
+ papermc
+ https://papermc.io/repo/repository/maven-public/
+
+
+
+
+
+
+ io.papermc.paper
+ paper-api
+ 1.20.2-R0.1-SNAPSHOT
+ provided
+
+
+ com.googlecode.json-simple
+ json-simple
+ 1.1.1
+ compile
+
+
+ org.projectlombok
+ lombok
+ 1.18.22
+ compile
+
+
+ io.github.ModularEnigma
+ Requests
+ 1.0.3
+
+
+ com.jayway.jsonpath
+ json-path
+ 2.8.0
+
+
+ com.google.code.gson
+ gson
+ 2.8.9
+ compile
+
+
+ org.slf4j
+ slf4j-api
+ 2.0.12
+ compile
+
+
+
+
\ No newline at end of file
diff --git a/zander-bridge/src/main/java/org/modularsoft/zander/bridge/ZanderBridgeMain.java b/zander-bridge/src/main/java/org/modularsoft/zander/bridge/ZanderBridgeMain.java
new file mode 100644
index 0000000..ce9e8d0
--- /dev/null
+++ b/zander-bridge/src/main/java/org/modularsoft/zander/bridge/ZanderBridgeMain.java
@@ -0,0 +1,34 @@
+package org.modularsoft.zander.bridge;
+
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.TextComponent;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.bukkit.plugin.java.JavaPlugin;
+import org.modularsoft.zander.bridge.util.api.Bridge;
+
+public class ZanderBridgeMain extends JavaPlugin {
+ public static ZanderBridgeMain plugin;
+
+ @Override
+ public void onEnable() {
+ plugin = this;
+
+ // Init Message
+ TextComponent enabledMessage = Component.empty()
+ .color(NamedTextColor.GREEN)
+ .append(Component.text("\n\nZander Bridge has been enabled.\n"))
+ .append(Component.text("Running Version " + plugin.getDescription().getVersion() + "\n"))
+ .append(Component.text("GitHub Repository: https://github.com/ModularSoftAU/zander\n"))
+ .append(Component.text("Created by Modular Software\n\n", NamedTextColor.DARK_PURPLE));
+ getServer().sendMessage(enabledMessage);
+
+ // Create an instance of Bridge and start the task
+ Bridge bridge = new Bridge(this);
+ bridge.startBridgeTask();
+
+ saveDefaultConfig();
+ }
+
+ @Override
+ public void onDisable() {}
+}
\ No newline at end of file
diff --git a/zander-bridge/src/main/java/org/modularsoft/zander/bridge/model/BridgeProcess.java b/zander-bridge/src/main/java/org/modularsoft/zander/bridge/model/BridgeProcess.java
new file mode 100644
index 0000000..fb91bfe
--- /dev/null
+++ b/zander-bridge/src/main/java/org/modularsoft/zander/bridge/model/BridgeProcess.java
@@ -0,0 +1,17 @@
+package org.modularsoft.zander.bridge.model;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class BridgeProcess {
+
+ @Getter Integer bridgeId;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-bridge/src/main/java/org/modularsoft/zander/bridge/util/api/Bridge.java b/zander-bridge/src/main/java/org/modularsoft/zander/bridge/util/api/Bridge.java
new file mode 100644
index 0000000..7ec4fef
--- /dev/null
+++ b/zander-bridge/src/main/java/org/modularsoft/zander/bridge/util/api/Bridge.java
@@ -0,0 +1,103 @@
+package org.modularsoft.zander.bridge.util.api;
+
+import com.jayway.jsonpath.JsonPath;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import org.bukkit.Bukkit;
+import org.bukkit.command.ConsoleCommandSender;
+import org.modularsoft.zander.bridge.ZanderBridgeMain;
+import org.modularsoft.zander.bridge.model.BridgeProcess;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+public class Bridge {
+ // Initialize the logger
+ private static final Logger logger = LoggerFactory.getLogger(Bridge.class);
+
+ private final ZanderBridgeMain plugin;
+
+ // Constructor to get the instance of the plugin
+ public Bridge(ZanderBridgeMain plugin) {
+ this.plugin = plugin;
+ }
+
+ public void startBridgeTask() {
+ String BaseAPIURL = plugin.getConfig().getString("BaseAPIURL");
+ String APIKey = plugin.getConfig().getString("APIKey");
+ String TargetServerName = plugin.getConfig().getString("TargetServerName");
+
+ // Create a ScheduledExecutorService with a single thread
+ ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
+
+ // Schedule the task to run every 60 seconds
+ scheduler.scheduleAtFixedRate(() -> {
+ try {
+ Request req = Request.builder()
+ .setURL(BaseAPIURL + "/bridge/get?targetServer=" + TargetServerName)
+ .setMethod(Request.Method.GET)
+ .addHeader("x-access-token", APIKey)
+ .build();
+
+ Response res = req.execute();
+ String json = res.getBody();
+
+ // Extract the list of data objects
+ List