diff --git a/pom.xml b/pom.xml
index 995e5be..edfc8c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,9 @@
pom
- zander-proxy
+
+
+ zander-velocity
zander-hub
zander-auth
@@ -22,34 +24,34 @@
clean install
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- 3.2.4
-
-
-
-
-
- package
-
- shade
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.8.1
-
- 1.8
- 1.8
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/zander-auth/pom.xml b/zander-auth/pom.xml
index ca571ee..91be739 100644
--- a/zander-auth/pom.xml
+++ b/zander-auth/pom.xml
@@ -13,19 +13,17 @@
1.0
-
papermc
- https://papermc.io/repo/repository/maven-public/
+ https://repo.papermc.io/repository/maven-public/
-
io.papermc.paper
paper-api
- 1.20.2-R0.1-SNAPSHOT
+ 1.21.4-R0.1-SNAPSHOT
provided
@@ -37,7 +35,7 @@
org.projectlombok
lombok
- 1.18.22
+ 1.18.36
compile
diff --git a/zander-hub/pom.xml b/zander-hub/pom.xml
index 10b1c99..7f283d5 100644
--- a/zander-hub/pom.xml
+++ b/zander-hub/pom.xml
@@ -1,4 +1,3 @@
-
@@ -13,20 +12,22 @@
1.0
-
papermc
- https://papermc.io/repo/repository/maven-public/
+ https://repo.papermc.io/repository/maven-public/
+
+
+ sonatype
+ https://oss.sonatype.org/content/groups/public
-
io.papermc.paper
paper-api
- 1.20.2-R0.1-SNAPSHOT
- provided
+ 1.21.4-R0.1-SNAPSHOT
+ compile
diff --git a/zander-velocity/dependency-reduced-pom.xml b/zander-velocity/dependency-reduced-pom.xml
new file mode 100644
index 0000000..fb7ee13
--- /dev/null
+++ b/zander-velocity/dependency-reduced-pom.xml
@@ -0,0 +1,81 @@
+
+
+ 4.0.0
+ org.modularsoft
+ zander-velocity
+ zander-velocity
+ 1.2.0
+
+
+
+ true
+ ${project.basedir}/src/main/resources
+
+
+
+
+ maven-compiler-plugin
+ 3.11.0
+
+ 17
+
+
+
+ maven-shade-plugin
+ 3.4.1
+
+
+ package
+
+ shade
+
+
+
+
+
+
+ *:*
+
+ META-INF/*.MF
+
+
+
+
+
+ dev.dejvokep.boostedyaml
+ org.modularsoft.zander.velocity.libs
+
+
+
+
+
+
+
+
+ papermc-repo
+ https://repo.papermc.io/repository/maven-public/
+
+
+ maven2
+ https://repo.maven.apache.org/maven2
+
+
+ jitpack.io
+ https://jitpack.io
+
+
+
+
+ com.velocitypowered
+ velocity-api
+ 3.4.0-SNAPSHOT
+ provided
+
+
+
+ 17
+ 17
+ 17
+ UTF-8
+
+
diff --git a/zander-velocity/pom.xml b/zander-velocity/pom.xml
new file mode 100644
index 0000000..8b37212
--- /dev/null
+++ b/zander-velocity/pom.xml
@@ -0,0 +1,130 @@
+
+ 4.0.0
+
+ org.modularsoft
+ zander-velocity
+ 1.2.0
+ jar
+
+ zander-velocity
+
+
+ 17
+ 17
+ 17
+ UTF-8
+
+
+
+
+
+ ${project.basedir}/src/main/resources
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.11.0
+
+ 17
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.4.1
+
+
+
+ *:*
+
+ META-INF/*.MF
+
+
+
+
+
+ dev.dejvokep.boostedyaml
+ org.modularsoft.zander.velocity.libs
+
+
+
+
+
+ package
+
+ shade
+
+
+
+
+
+
+
+
+
+ papermc-repo
+ https://repo.papermc.io/repository/maven-public/
+
+
+ maven2
+ https://repo.maven.apache.org/maven2
+
+
+ jitpack.io
+ https://jitpack.io
+
+
+
+
+
+ com.velocitypowered
+ velocity-api
+ 3.4.0-SNAPSHOT
+ provided
+
+
+ com.googlecode.json-simple
+ json-simple
+ 1.1.1
+ compile
+
+
+ org.projectlombok
+ lombok
+ 1.18.36
+ compile
+
+
+ io.github.ModularEnigma
+ Requests
+ 1.0.3
+
+
+ com.jayway.jsonpath
+ json-path
+ 2.9.0
+
+
+ com.google.code.gson
+ gson
+ 2.8.9
+ compile
+
+
+ org.slf4j
+ slf4j-api
+ 2.0.12
+ compile
+
+
+ dev.dejvokep
+ boosted-yaml
+ 1.3.1
+
+
+
\ No newline at end of file
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/ZanderVelocityMain.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/ZanderVelocityMain.java
new file mode 100644
index 0000000..15a42c3
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/ZanderVelocityMain.java
@@ -0,0 +1,118 @@
+package org.modularsoft.zander.velocity;
+
+import com.google.inject.Inject;
+import com.velocitypowered.api.command.CommandManager;
+import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.plugin.Dependency;
+import com.velocitypowered.api.plugin.Plugin;
+import com.velocitypowered.api.plugin.PluginContainer;
+import com.velocitypowered.api.plugin.annotation.DataDirectory;
+import com.velocitypowered.api.proxy.ProxyServer;
+import dev.dejvokep.boostedyaml.YamlDocument;
+import dev.dejvokep.boostedyaml.dvs.versioning.BasicVersioning;
+import dev.dejvokep.boostedyaml.settings.dumper.DumperSettings;
+import dev.dejvokep.boostedyaml.settings.general.GeneralSettings;
+import dev.dejvokep.boostedyaml.settings.loader.LoaderSettings;
+import dev.dejvokep.boostedyaml.settings.updater.UpdaterSettings;
+import lombok.Getter;
+import org.modularsoft.zander.velocity.commands.*;
+import org.modularsoft.zander.velocity.commands.moderation.clearchat;
+import org.modularsoft.zander.velocity.commands.moderation.freezechat;
+import org.modularsoft.zander.velocity.events.*;
+import org.modularsoft.zander.velocity.events.moderation.FreezeChatListener;
+import org.modularsoft.zander.velocity.events.session.UserOnDisconnect;
+import org.modularsoft.zander.velocity.events.session.UserOnLogin;
+import org.modularsoft.zander.velocity.events.session.UserOnSwitch;
+import org.modularsoft.zander.velocity.util.announcement.TipChatter;
+import org.modularsoft.zander.velocity.util.api.Heartbeat;
+import org.slf4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.util.Objects;
+import java.util.Optional;
+
+@Plugin(
+ id = "zander-velocity",
+ authors = "ModularSoft",
+ description = "The proxy that allows the connection and integration of the Zander minecraft suite.",
+ name = "zander-velocity",
+ version = "1.2.0",
+ dependencies = {
+ @Dependency(id = "signedvelocity")
+ }
+)
+public class ZanderVelocityMain {
+ @Getter
+ private static Logger logger;
+ @Getter
+ public static ProxyServer proxy;
+ @Getter
+ private static YamlDocument config;
+ @Getter
+ private final CommandManager commandManager;
+
+ @Subscribe
+ public void onProxyInitialization(ProxyInitializeEvent event) {
+ // Event Listeners
+ proxy.getEventManager().register(this, new UserChatEvent());
+ proxy.getEventManager().register(this, new UserCommandSpyEvent());
+ proxy.getEventManager().register(this, new UserOnDisconnect());
+ proxy.getEventManager().register(this, new UserOnLogin());
+ proxy.getEventManager().register(this, new UserOnProxyPing(this));
+ proxy.getEventManager().register(this, new UserOnSwitch());
+ proxy.getEventManager().register(this, new UserSocialSpyEvent());
+ proxy.getEventManager().register(this, new FreezeChatListener());
+
+ // Commands
+ CommandManager commandManager = proxy.getCommandManager();
+
+ commandManager.register(commandManager.metaBuilder("discord").build(), new discord());
+ commandManager.register(commandManager.metaBuilder("rules").build(), new rules());
+ commandManager.register(commandManager.metaBuilder("website").build(), new website());
+ commandManager.register(commandManager.metaBuilder("ping").build(), new ping());
+ commandManager.register(commandManager.metaBuilder("report").build(), new report());
+ commandManager.register(commandManager.metaBuilder("clearchat").build(), new clearchat());
+ commandManager.register(commandManager.metaBuilder("freezechat").build(), new freezechat());
+
+ // Start the Heartbeat task
+ Heartbeat.startHeartbeatTask();
+
+ // Start the Announcement Tip task
+ TipChatter.startAnnouncementTipTask();
+ }
+
+ @Inject
+ public ZanderVelocityMain(
+ ProxyServer proxy,
+ Logger logger,
+ CommandManager commandManager,
+ @DataDirectory Path dataDirectory
+ ) {
+ this.proxy = proxy;
+ this.logger = logger;
+ this.commandManager = commandManager;
+
+ // Create configuration file
+ try {
+ config = YamlDocument.create(new File(dataDirectory.toFile(), "config.yml"),
+ Objects.requireNonNull(getClass().getResourceAsStream("/config.yml")),
+ GeneralSettings.DEFAULT,
+ LoaderSettings.builder().setAutoUpdate(true).build(),
+ DumperSettings.DEFAULT,
+ UpdaterSettings.builder().setVersioning(new BasicVersioning("config-version"))
+ .setOptionSorting(UpdaterSettings.OptionSorting.SORT_BY_DEFAULTS).build());
+
+ config.update();
+ config.save();
+ } catch (IOException e) {
+ logger.error("Could not create or load plugin configuration, plugin will now be disabled.");
+ Optional container = proxy.getPluginManager().getPlugin("zander-velocity");
+ container.ifPresent(pluginContainer -> pluginContainer.getExecutorService().shutdown());
+ }
+
+ logger.info("Zander Proxy has started.");
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/discord.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/discord.java
new file mode 100644
index 0000000..cfc9159
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/discord.java
@@ -0,0 +1,44 @@
+package org.modularsoft.zander.velocity.commands;
+
+import com.jayway.jsonpath.JsonPath;
+import com.velocitypowered.api.command.CommandSource;
+import com.velocitypowered.api.command.SimpleCommand;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.event.ClickEvent;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+
+public class discord implements SimpleCommand {
+ @Override
+ public void execute(final Invocation invocation) {
+ CommandSource source = invocation.source();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ try {
+ // GET request to link to discord.
+ Request req = Request.builder()
+ .setURL(BaseAPIURL + "/web/configuration")
+ .setMethod(Request.Method.GET)
+ .addHeader("x-access-token", APIKey)
+ .build();
+
+ Response res = req.execute();
+ String json = res.getBody();
+ String siteAddress = JsonPath.read(json, "$.data.siteAddress");
+
+ Component message = Component.text("Get to know the community and join our Discord here: " + siteAddress + "/discord")
+ .color(NamedTextColor.BLUE);
+ message = message.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL,siteAddress + "/discord"));
+ source.sendMessage(message);
+ return;
+ } catch (Exception e) {
+ Component builder = Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED);
+ source.sendMessage(builder);
+ System.out.println(e);
+ }
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/moderation/clearchat.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/moderation/clearchat.java
new file mode 100644
index 0000000..6c1c0b1
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/moderation/clearchat.java
@@ -0,0 +1,51 @@
+package org.modularsoft.zander.velocity.commands.moderation;
+
+import com.velocitypowered.api.command.CommandSource;
+import com.velocitypowered.api.command.SimpleCommand;
+import com.velocitypowered.api.proxy.Player;
+import com.velocitypowered.api.proxy.server.RegisteredServer;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+
+import java.util.Optional;
+
+public class clearchat implements SimpleCommand {
+ @Override
+ public void execute(final Invocation invocation) {
+ CommandSource source = invocation.source();
+
+ // Check permission
+ if (!source.hasPermission("zander.moderation.chat.clear")) {
+ source.sendMessage(Component.text("You do not have permission to use this command.")
+ .color(NamedTextColor.RED));
+ return;
+ }
+
+ // Get the server the command source is on (if it's a player)
+ Optional serverOptional = (source instanceof Player player)
+ ? player.getCurrentServer().map(serverConnection -> serverConnection.getServer())
+ : Optional.empty();
+
+ if (serverOptional.isEmpty()) {
+ source.sendMessage(Component.text("You must be on a server to use this command.")
+ .color(NamedTextColor.RED));
+ return;
+ }
+
+ RegisteredServer targetServer = serverOptional.get();
+ String senderName = (source instanceof Player) ? ((Player) source).getUsername() : "Console";
+
+ // Send 150 empty messages to all players on the server
+ targetServer.getPlayersConnected().forEach(player -> {
+ for (int i = 0; i < 150; i++) {
+ player.sendMessage(Component.text(" "));
+ }
+ player.sendMessage(Component.text("Chat has been cleared by " + senderName + ".")
+ .color(NamedTextColor.YELLOW));
+ });
+
+ // Confirmation message
+ source.sendMessage(Component.text("Chat cleared for this server by " + senderName + ".")
+ .color(NamedTextColor.GREEN));
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/moderation/freezechat.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/moderation/freezechat.java
new file mode 100644
index 0000000..516d30f
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/moderation/freezechat.java
@@ -0,0 +1,43 @@
+package org.modularsoft.zander.velocity.commands.moderation;
+
+import com.velocitypowered.api.command.CommandSource;
+import com.velocitypowered.api.command.SimpleCommand;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.util.ChatFreezeManager;
+
+public class freezechat implements SimpleCommand {
+
+ @Override
+ public void execute(final Invocation invocation) {
+ CommandSource source = invocation.source();
+
+ // Check permission
+ if (!source.hasPermission("zander.moderation.chat.freeze")) {
+ source.sendMessage(Component.text("You do not have permission to use this command.")
+ .color(NamedTextColor.RED));
+ return;
+ }
+
+ // Toggle chat freeze state
+ boolean isNowFrozen = !ChatFreezeManager.isChatFrozen();
+ ChatFreezeManager.setChatFrozen(isNowFrozen);
+
+ // Determine who executed the command
+ String senderName = (source instanceof com.velocitypowered.api.proxy.Player)
+ ? ((com.velocitypowered.api.proxy.Player) source).getUsername()
+ : "Console";
+
+ // Broadcast message about chat freeze state change
+ Component message = isNowFrozen
+ ? Component.text("Chat has been frozen by " + senderName + ".").color(NamedTextColor.RED)
+ : Component.text("Chat has been unfrozen by " + senderName + ".").color(NamedTextColor.GREEN);
+
+ ZanderVelocityMain.proxy.getAllPlayers().forEach(player -> player.sendMessage(message));
+
+ // Confirm action to the sender
+ source.sendMessage(Component.text("You have " + (isNowFrozen ? "frozen" : "unfrozen") + " the chat.")
+ .color(NamedTextColor.YELLOW));
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/ping.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/ping.java
new file mode 100644
index 0000000..d430543
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/ping.java
@@ -0,0 +1,30 @@
+package org.modularsoft.zander.velocity.commands;
+
+import com.velocitypowered.api.command.CommandSource;
+import com.velocitypowered.api.command.SimpleCommand;
+import com.velocitypowered.api.proxy.Player;
+import lombok.NonNull;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+
+public class ping implements SimpleCommand {
+
+ @Override
+ public void execute(@NonNull Invocation invocation) {
+ CommandSource source = invocation.source();
+
+ // Check if the source is a player
+ if (source instanceof Player) {
+ Player player = (Player) source;
+ long ping = player.getPing(); // getPing() returns a long
+
+ // Send the ping message to the player
+ Component message = Component.text("Your ping is: ")
+ .append(Component.text(ping).color(NamedTextColor.GREEN));
+
+ player.sendMessage(message);
+ } else {
+ source.sendMessage(Component.text("This command can only be used by players.").color(NamedTextColor.RED));
+ }
+ }
+}
\ No newline at end of file
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/report.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/report.java
new file mode 100644
index 0000000..72825e5
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/report.java
@@ -0,0 +1,115 @@
+package org.modularsoft.zander.velocity.commands;
+
+import com.jayway.jsonpath.JsonPath;
+import com.velocitypowered.api.command.CommandSource;
+import com.velocitypowered.api.command.SimpleCommand;
+import com.velocitypowered.api.proxy.Player;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.model.Report;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.modularsoft.zander.velocity.ZanderVelocityMain.proxy;
+
+public class report implements SimpleCommand {
+ @Override
+ public void execute(Invocation invocation) {
+ CommandSource source = invocation.source();
+ String[] args = invocation.arguments();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ if (source instanceof Player) {
+ Player player = (Player) source;
+
+ if (args.length < 2) {
+ player.sendMessage(Component.text("Usage: /report ").color(NamedTextColor.RED));
+ return;
+ }
+
+ String reportedUsername = args[0];
+
+ // Check if the player is trying to report themselves
+ if (reportedUsername.equalsIgnoreCase(player.getUsername())) {
+ player.sendMessage(Component.text("You cannot report yourself.").color(NamedTextColor.RED));
+ return;
+ }
+
+ StringBuilder reasonBuilder = new StringBuilder();
+ for (int i = 1; i < args.length; i++) {
+ reasonBuilder.append(args[i]).append(" ");
+ }
+ String reason = reasonBuilder.toString().trim();
+
+ try {
+ // Build the report object
+ Report report = Report.builder()
+ .reportPlatform("INGAME")
+ .reportedUser(reportedUsername)
+ .reporterUser(player.getUsername())
+ .reportReason(reason)
+ .build();
+
+ // Create and send the request
+ Request reportReq = Request.builder()
+ .setURL(BaseAPIURL + "/report/create")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(report.toString())
+ .build();
+
+ // Get the response from the API
+ Response reportRes = reportReq.execute();
+ String json = reportRes.getBody();
+ Boolean success = JsonPath.read(json, "$.success");
+ String message = JsonPath.read(json, "$.message");
+
+ if (success) {
+ player.sendMessage(Component.text(message).color(NamedTextColor.GREEN));
+
+ // Send report information to all staff with the permission zander.report.notify
+ for (Player onlinePlayer : proxy.getAllPlayers()) {
+ if (onlinePlayer.hasPermission("zander.report.notify")) {
+ onlinePlayer.sendMessage(Component.text("Report submitted by " + player.getUsername() + ": " + reason)
+ .color(NamedTextColor.YELLOW));
+ }
+ }
+
+ } else {
+ player.sendMessage(Component.text(message).color(NamedTextColor.RED));
+ }
+
+ } catch (Exception e) {
+ player.sendMessage(Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED));
+ System.out.println(e);
+ }
+ } else {
+ source.sendMessage(Component.text("Only players can use this command.").color(NamedTextColor.RED));
+ }
+ }
+
+ // Tab-completion method
+ @Override
+ public List suggest(Invocation invocation) {
+ CommandSource source = invocation.source();
+ String[] args = invocation.arguments();
+ List completions = new ArrayList<>();
+
+ if (args.length == 1 && source instanceof Player) {
+ // Autocomplete the username (first argument)
+ for (Player player : proxy.getAllPlayers()) {
+ if (player.getUsername().toLowerCase().startsWith(args[0].toLowerCase())) {
+ completions.add(player.getUsername());
+ }
+ }
+ }
+
+ return completions;
+ }
+}
\ No newline at end of file
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/rules.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/rules.java
new file mode 100644
index 0000000..438d97c
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/rules.java
@@ -0,0 +1,43 @@
+package org.modularsoft.zander.velocity.commands;
+
+import com.jayway.jsonpath.JsonPath;
+import com.velocitypowered.api.command.CommandSource;
+import com.velocitypowered.api.command.SimpleCommand;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.event.ClickEvent;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+
+public class rules implements SimpleCommand {
+ @Override
+ public void execute(final Invocation invocation) {
+ CommandSource source = invocation.source();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ try {
+ // GET request to link to discord.
+ Request req = Request.builder()
+ .setURL(BaseAPIURL + "/web/configuration")
+ .setMethod(Request.Method.GET)
+ .addHeader("x-access-token", APIKey)
+ .build();
+
+ Response res = req.execute();
+ String json = res.getBody();
+ String siteAddress = JsonPath.read(json, "$.data.siteAddress");
+
+ Component message = Component.text("Please read and abide by the rules which you can find on our website here: " + siteAddress + "/rules")
+ .color(NamedTextColor.RED);
+ message = message.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL,siteAddress + "/rules"));
+ source.sendMessage(message);
+ } catch (Exception e) {
+ Component builder = Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED);
+ source.sendMessage(builder);
+ System.out.println(e);
+ }
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/website.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/website.java
new file mode 100644
index 0000000..39af9b6
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/commands/website.java
@@ -0,0 +1,43 @@
+package org.modularsoft.zander.velocity.commands;
+
+import com.jayway.jsonpath.JsonPath;
+import com.velocitypowered.api.command.CommandSource;
+import com.velocitypowered.api.command.SimpleCommand;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.event.ClickEvent;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+
+public class website implements SimpleCommand {
+ @Override
+ public void execute(final Invocation invocation) {
+ CommandSource source = invocation.source();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ try {
+ // GET request to link to discord.
+ Request req = Request.builder()
+ .setURL(BaseAPIURL + "/web/configuration")
+ .setMethod(Request.Method.GET)
+ .addHeader("x-access-token", APIKey)
+ .build();
+
+ Response res = req.execute();
+ String json = res.getBody();
+ String siteAddress = JsonPath.read(json, "$.data.siteAddress");
+
+ Component message = Component.text("For all information regarding the Network, visit our website: " + siteAddress)
+ .color(NamedTextColor.YELLOW);
+ message = message.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL,siteAddress));
+ source.sendMessage(message);
+ } catch (Exception e) {
+ Component builder = Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED);
+ source.sendMessage(builder);
+ System.out.println(e);
+ }
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserChatEvent.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserChatEvent.java
new file mode 100644
index 0000000..2140a07
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserChatEvent.java
@@ -0,0 +1,75 @@
+package org.modularsoft.zander.velocity.events;
+
+import com.jayway.jsonpath.JsonPath;
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.event.player.PlayerChatEvent;
+import com.velocitypowered.api.proxy.Player;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.model.Filter;
+import org.modularsoft.zander.velocity.model.discord.DiscordChat;
+
+public class UserChatEvent {
+
+ @Subscribe
+ public void UserChatEvent(PlayerChatEvent event) {
+ Player player = event.getPlayer();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ // Filter out commands.
+ if (event.getMessage().startsWith("/")) return;
+
+ // Check chat for blocked content
+ try {
+ Filter phrase = Filter.builder()
+ .content(event.getMessage().toString())
+ .build();
+
+ Request phraseReq = Request.builder()
+ .setURL(BaseAPIURL + "/filter")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(phrase.toString())
+ .build();
+
+ Response phraseRes = phraseReq.execute();
+ String phraseJson = phraseRes.getBody();
+
+ Boolean success = JsonPath.parse(phraseJson).read("$.success");
+ String phraseCaughtMessage = JsonPath.read(phraseJson, "$.message");
+
+ ZanderVelocityMain.getLogger().info("[FILTER] Response (" + phraseRes.getStatusCode() + "): " + phraseRes.getBody());
+
+ if (!success) {
+ Component builder = Component.text(phraseCaughtMessage).color(NamedTextColor.RED);
+ player.sendMessage(builder);
+ event.setResult(PlayerChatEvent.ChatResult.denied());
+ } else {
+ DiscordChat chat = DiscordChat.builder()
+ .username(player.getUsername())
+ .server(player.getCurrentServer().get().getServer().getServerInfo().getName())
+ .content(event.getMessage().toString())
+ .build();
+
+ Request discordChatReq = Request.builder()
+ .setURL(BaseAPIURL + "/discord/chat")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", String.valueOf(APIKey))
+ .setRequestBody(chat.toString())
+ .build();
+
+ Response discordChatReqRes = discordChatReq.execute();
+ ZanderVelocityMain.getLogger().info("Response (" + discordChatReqRes.getStatusCode() + "): " + discordChatReqRes.getBody());
+ }
+ } catch (Exception e) {
+ Component builder = Component.text("The chat filter could not be reached at this time, there maybe an issue with the API.").color(NamedTextColor.YELLOW);
+ player.sendMessage(builder);
+ System.out.println(e);
+ }
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserCommandSpyEvent.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserCommandSpyEvent.java
new file mode 100644
index 0000000..79311f5
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserCommandSpyEvent.java
@@ -0,0 +1,61 @@
+package org.modularsoft.zander.velocity.events;
+
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.event.command.CommandExecuteEvent;
+import com.velocitypowered.api.proxy.Player;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.model.discord.spy.DiscordCommandSpy;
+
+public class UserCommandSpyEvent {
+
+ @Subscribe
+ public void onPlayerCommand(CommandExecuteEvent event) {
+ // Ensure the command source is a player
+ if (!(event.getCommandSource() instanceof Player)) {
+ return;
+ }
+
+ Player player = (Player) event.getCommandSource();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+ String command = event.getCommand(); // Get the full command
+
+ ZanderVelocityMain.getLogger().info("Command: {}", command);
+
+ // Check if the command is one we need to log (ignore direct message commands)
+ if (command.startsWith("msg") || command.startsWith("tell") || command.startsWith("w")
+ || command.startsWith("message") || command.startsWith("r")) {
+ return;
+ }
+
+ //
+ // Command Spy API POST
+ //
+ try {
+ DiscordCommandSpy commandSpy = DiscordCommandSpy.builder()
+ .username(player.getUsername())
+ .command(command)
+ .server(player.getCurrentServer().get().getServer().getServerInfo().getName())
+ .build();
+
+ Request commandSpyReq = Request.builder()
+ .setURL(BaseAPIURL + "/discord/spy/command")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", String.valueOf(APIKey))
+ .setRequestBody(commandSpy.toString())
+ .build();
+
+ Response commandSpyRes = commandSpyReq.execute();
+ ZanderVelocityMain.getLogger().info("Response (" + commandSpyRes.getStatusCode() + "): " + commandSpyRes.getBody());
+ } catch (Exception e) {
+ Component builder = Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED);
+ player.disconnect(builder);
+ System.out.println(e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserOnProxyPing.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserOnProxyPing.java
new file mode 100644
index 0000000..2c0038a
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserOnProxyPing.java
@@ -0,0 +1,71 @@
+package org.modularsoft.zander.velocity.events;
+
+import com.jayway.jsonpath.JsonPath;
+import com.velocitypowered.api.event.PostOrder;
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.event.proxy.ProxyPingEvent;
+import com.velocitypowered.api.proxy.server.ServerPing.Builder;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+
+public class UserOnProxyPing {
+
+ private final ZanderVelocityMain plugin;
+
+ public UserOnProxyPing(ZanderVelocityMain plugin) {
+ this.plugin = plugin;
+ ZanderVelocityMain.getProxy().getEventManager().register(plugin, this);
+ }
+
+ @Subscribe(order = PostOrder.FIRST)
+ public void onProxyPingEvent(ProxyPingEvent event) {
+ // Get the existing ServerPing.Builder from the event
+ Builder pingBuilder = event.getPing().asBuilder();
+
+ try {
+ // Fetch configuration values
+ String baseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String apiKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ // Make a GET request to fetch the MOTD
+ Request req = Request.builder()
+ .setURL(baseAPIURL + "/announcement/get?announcementType=motd")
+ .setMethod(Request.Method.GET)
+ .addHeader("x-access-token", apiKey)
+ .build();
+
+ Response res = req.execute();
+ String json = res.getBody();
+
+ // Parse and format the MOTD
+ String colourMessageFormat = JsonPath.read(json, "$.data[0].colourMessageFormat");
+ String motdTopLine = ZanderVelocityMain.getConfig().getString(Route.from("announcementMOTDTopLine"));
+ Component serverPingDescription = LegacyComponentSerializer.builder()
+ .character('&')
+ .build()
+ .deserialize(motdTopLine + "\n" + colourMessageFormat);
+
+ // Set the description in the ServerPing.Builder
+ pingBuilder.description(serverPingDescription);
+
+ } catch (Exception e) {
+ System.out.print(e);
+
+ // Fallback MOTD in case of an exception
+ String motdTopLine = ZanderVelocityMain.getConfig().getString(Route.from("announcementMOTDTopLine"));
+ Component fallbackDescription = LegacyComponentSerializer.builder()
+ .character('&')
+ .build()
+ .deserialize(motdTopLine + "\n" + "&3&lPowered by Zander");
+
+ pingBuilder.description(fallbackDescription);
+ }
+
+ // Set the modified ServerPing back to the event
+ event.setPing(pingBuilder.build());
+ }
+}
\ No newline at end of file
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserSocialSpyEvent.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserSocialSpyEvent.java
new file mode 100644
index 0000000..2320caa
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/UserSocialSpyEvent.java
@@ -0,0 +1,88 @@
+package org.modularsoft.zander.velocity.events;
+
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.event.command.CommandExecuteEvent;
+import com.velocitypowered.api.proxy.Player;
+import com.velocitypowered.api.proxy.ServerConnection;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.model.discord.spy.DiscordSocialSpy;
+import org.slf4j.Logger;
+
+import java.util.Arrays;
+import java.util.Optional;
+
+public class UserSocialSpyEvent {
+
+ private static final Logger logger = ZanderVelocityMain.getLogger();
+
+ @Subscribe
+ public void onUserChatDMEvent(CommandExecuteEvent event) {
+ // Ensure the command source is a player
+ if (!(event.getCommandSource() instanceof Player)) {
+ return;
+ }
+
+ Player player = (Player) event.getCommandSource();
+ String command = event.getCommand();
+
+ logger.info("Command: {}", command);
+
+ // Check if the command is a direct message command
+ if (command.contains("msg") || command.contains("tell") || command.contains("w")
+ || command.contains("message") || command.contains("r")) {
+
+ // Split the command into parts and check for minimum required arguments
+ String[] commandParts = command.split(" ");
+ if (commandParts.length < 3) {
+ logger.warn("Invalid direct message format from player: {}", player.getUsername());
+ return; // Invalid command format, return without processing
+ }
+
+ String targetPlayer = commandParts[1]; // The player who is being messaged
+ String directMessage = String.join(" ", Arrays.copyOfRange(commandParts, 2, commandParts.length)); // The actual message
+
+ try {
+ // Ensure the player is connected to a server
+ Optional currentServerOpt = player.getCurrentServer();
+ if (currentServerOpt.isEmpty()) {
+ logger.warn("Player {} is not connected to any server", player.getUsername());
+ return; // Player is not connected to a server, return early
+ }
+
+ ServerConnection currentServer = currentServerOpt.get();
+
+ // Construct the social spy object
+ DiscordSocialSpy socialSpy = DiscordSocialSpy.builder()
+ .usernameFrom(player.getUsername())
+ .usernameTo(targetPlayer)
+ .directMessage(directMessage)
+ .server(currentServer.getServerInfo().getName())
+ .build();
+
+ // Fetch API URL and key
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ // Send the social spy request to the API
+ Request socialSpyReq = Request.builder()
+ .setURL(BaseAPIURL + "/discord/spy/directMessage")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(socialSpy.toString()) // Ensure proper serialization to JSON
+ .build();
+
+ Response socialSpyRes = socialSpyReq.execute();
+ logger.info("Social Spy Response ({}): {}", socialSpyRes.getStatusCode(), socialSpyRes.getBody());
+
+ } catch (Exception e) {
+ logger.error("Error occurred while handling social spy request", e);
+ player.sendMessage(Component.text("An error occurred, but you can continue playing.").color(NamedTextColor.RED));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/moderation/FreezeChatListener.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/moderation/FreezeChatListener.java
new file mode 100644
index 0000000..f5e7b1b
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/moderation/FreezeChatListener.java
@@ -0,0 +1,23 @@
+package org.modularsoft.zander.velocity.events.moderation;
+
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.event.player.PlayerChatEvent;
+import com.velocitypowered.api.proxy.Player;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.util.ChatFreezeManager;
+
+public class FreezeChatListener {
+ @Subscribe
+ public void onPlayerChat(PlayerChatEvent event) {
+ Player player = event.getPlayer();
+
+ // Allow staff to chat even if frozen
+ if (ChatFreezeManager.isChatFrozen() && !player.hasPermission("zander.moderation.chat.freeze")) {
+ player.sendMessage(Component.text("Chat is currently frozen by staff.")
+ .color(NamedTextColor.RED));
+ event.setResult(PlayerChatEvent.ChatResult.denied());
+ }
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnDisconnect.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnDisconnect.java
new file mode 100644
index 0000000..b560fbe
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnDisconnect.java
@@ -0,0 +1,75 @@
+package org.modularsoft.zander.velocity.events.session;
+
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.event.connection.DisconnectEvent;
+import com.velocitypowered.api.proxy.Player;
+import com.velocitypowered.api.proxy.ProxyServer;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.model.discord.DiscordLeave;
+import org.modularsoft.zander.velocity.model.session.SessionDestroy;
+
+public class UserOnDisconnect {
+ @Subscribe
+ public void UserDisconnectEvent (DisconnectEvent event) {
+ Player player = event.getPlayer();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ boolean isConnected = isConnected(ZanderVelocityMain.getProxy(), player.getUsername());
+ if (isConnected) return;
+
+ //
+ // Destory Session API POST
+ //
+ try {
+ SessionDestroy destroySession = SessionDestroy.builder()
+ .uuid(player.getUniqueId())
+ .build();
+
+ Request destroySessionReq = Request.builder()
+ .setURL(BaseAPIURL + "/session/destroy")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(destroySession.toString())
+ .build();
+
+ Response destroySessionRes = destroySessionReq.execute();
+ ZanderVelocityMain.getLogger().info("Response (" + destroySessionRes.getStatusCode() + "): " + destroySessionRes.getBody());
+ } catch (Exception e) {
+ Component builder = Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED);
+ player.disconnect(builder);
+ }
+
+ //
+ // Send Discord API POST for disconnect message
+ //
+ try {
+ DiscordLeave leave = DiscordLeave.builder()
+ .username(player.getUsername())
+ .build();
+
+ Request discordLeaveReq = Request.builder()
+ .setURL(BaseAPIURL + "/discord/leave")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(leave.toString())
+ .build();
+
+ Response discordLeaveRes = discordLeaveReq.execute();
+ ZanderVelocityMain.getLogger().info("Response (" + discordLeaveRes.getStatusCode() + "): " + discordLeaveRes.getBody());
+ } catch (Exception e) {
+ Component builder = Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED);
+ player.disconnect(builder);
+ }
+ }
+
+ public static boolean isConnected(ProxyServer proxy, String playerName) {
+ Player player = proxy.getPlayer(playerName).orElse(null);
+ return player != null;
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnLogin.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnLogin.java
new file mode 100644
index 0000000..6eea4a9
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnLogin.java
@@ -0,0 +1,84 @@
+package org.modularsoft.zander.velocity.events.session;
+
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.event.connection.PostLoginEvent;
+import com.velocitypowered.api.proxy.Player;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.model.discord.DiscordJoin;
+import org.modularsoft.zander.velocity.model.session.SessionCreate;
+import org.modularsoft.zander.velocity.model.user.UserCreation;
+
+public class UserOnLogin {
+ @Subscribe
+ public void UserLoginEvent (PostLoginEvent event) {
+ Player player = event.getPlayer();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ try {
+ //
+ // Send User Creation API POST for new user
+ //
+ UserCreation createUser = UserCreation.builder()
+ .uuid(player.getUniqueId())
+ .username(player.getUsername())
+ .build();
+
+ Request createUserReq = Request.builder()
+ .setURL(BaseAPIURL + "/user/create")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(createUser.toString())
+ .build();
+
+ Response createUserRes = createUserReq.execute();
+ ZanderVelocityMain.getLogger().info("Response (" + createUserRes.getStatusCode() + "): " + createUserRes.getBody());
+
+ try {
+ //
+ // Start Session API POST
+ //
+ SessionCreate createSession = SessionCreate.builder()
+ .uuid(player.getUniqueId())
+ .ipAddress(player.getRemoteAddress().getAddress().toString())
+ .build();
+
+ Request createSessionReq = Request.builder()
+ .setURL(BaseAPIURL + "/session/create")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(createSession.toString())
+ .build();
+
+ Response createSessionRes = createSessionReq.execute();
+ ZanderVelocityMain.getLogger().info("Response (" + createSessionRes.getStatusCode() + "): " + createSessionRes.getBody());
+
+ // Send Discord API POST for join message
+ DiscordJoin join = DiscordJoin.builder()
+ .username(player.getUsername())
+ .build();
+
+ Request discordJoinReq = Request.builder()
+ .setURL(BaseAPIURL + "/discord/join")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(join.toString())
+ .build();
+
+ Response discordJoinRes = discordJoinReq.execute();
+ ZanderVelocityMain.getLogger().info("Response (" + discordJoinRes.getStatusCode() + "): " + discordJoinRes.getBody());
+ } catch (Exception e) {
+ Component builder = Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED);
+ player.disconnect(builder);
+ }
+ } catch (Exception e) {
+ Component builder = Component.text("An error has occurred. Is the API down?").color(NamedTextColor.RED);
+ player.disconnect(builder);
+ }
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnSwitch.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnSwitch.java
new file mode 100644
index 0000000..b39aeb7
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/events/session/UserOnSwitch.java
@@ -0,0 +1,75 @@
+package org.modularsoft.zander.velocity.events.session;
+
+import com.velocitypowered.api.event.Subscribe;
+import com.velocitypowered.api.event.player.ServerConnectedEvent;
+import com.velocitypowered.api.proxy.Player;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.modularsoft.zander.velocity.model.discord.DiscordSwitch;
+import org.modularsoft.zander.velocity.model.session.SessionSwitch;
+import org.slf4j.Logger;
+
+import java.util.UUID;
+
+public class UserOnSwitch {
+ private static final Logger logger = ZanderVelocityMain.getLogger();
+
+ @Subscribe
+ public void onServerConnect(ServerConnectedEvent event) {
+ Player player = event.getPlayer();
+ String username = player.getUsername();
+ UUID playerUUID = player.getUniqueId();
+ String server = event.getServer().getServerInfo().getName();
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ logger.info("Player {} is switching to server {}", username, server);
+
+ // Handle Session Switch API
+ try {
+ SessionSwitch switchSession = SessionSwitch.builder()
+ .uuid(playerUUID)
+ .server(server)
+ .build();
+
+ Request switchSessionReq = Request.builder()
+ .setURL(BaseAPIURL + "/session/switch")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(switchSession.toString()) // Ensure this method works properly
+ .build();
+
+ Response switchSessionRes = switchSessionReq.execute();
+ logger.info("Session Switch Response ({}): {}", switchSessionRes.getStatusCode(), switchSessionRes.getBody());
+ } catch (Exception e) {
+ logger.error("Error during Session Switch API request", e);
+ player.disconnect(Component.text("An error has occurred. Please try again later.").color(NamedTextColor.RED));
+ return; // Exit if a session switch fails
+ }
+
+ // Handle Discord Switch API
+ try {
+ DiscordSwitch discordSwitch = DiscordSwitch.builder()
+ .username(username)
+ .server(server)
+ .build();
+
+ Request discordSwitchReq = Request.builder()
+ .setURL(BaseAPIURL + "/discord/switch")
+ .setMethod(Request.Method.POST)
+ .addHeader("x-access-token", APIKey)
+ .setRequestBody(discordSwitch.toString()) // Ensure this method works properly
+ .build();
+
+ Response discordSwitchRes = discordSwitchReq.execute();
+ logger.info("Discord Switch Response ({}): {}", discordSwitchRes.getStatusCode(), discordSwitchRes.getBody());
+ } catch (Exception e) {
+ logger.error("Error during Discord Switch API request", e);
+ player.sendMessage(Component.text("An error occurred, but you can still continue playing.").color(NamedTextColor.RED));
+ }
+ }
+}
\ No newline at end of file
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/Filter.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/Filter.java
similarity index 83%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/Filter.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/Filter.java
index 32eab6a..f52433c 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/Filter.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/Filter.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model;
+package org.modularsoft.zander.velocity.model;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/Report.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/Report.java
new file mode 100644
index 0000000..8456f65
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/Report.java
@@ -0,0 +1,20 @@
+package org.modularsoft.zander.velocity.model;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class Report {
+
+ @Getter String reportPlatform;
+ @Getter String reportedUser;
+ @Getter String reporterUser;
+ @Getter String reportReason;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
\ No newline at end of file
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordChat.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordChat.java
similarity index 84%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordChat.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordChat.java
index fd8fadc..30e1dd5 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordChat.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordChat.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.discord;
+package org.modularsoft.zander.velocity.model.discord;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordJoin.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordJoin.java
similarity index 81%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordJoin.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordJoin.java
index 056b2c5..6424d10 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordJoin.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordJoin.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.discord;
+package org.modularsoft.zander.velocity.model.discord;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordLeave.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordLeave.java
similarity index 81%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordLeave.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordLeave.java
index 4519355..50f4a28 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordLeave.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordLeave.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.discord;
+package org.modularsoft.zander.velocity.model.discord;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordSwitch.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordSwitch.java
similarity index 82%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordSwitch.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordSwitch.java
index 9806a32..0fae2be 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/DiscordSwitch.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/DiscordSwitch.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.discord;
+package org.modularsoft.zander.velocity.model.discord;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/spy/DiscordCommandSpy.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/spy/DiscordCommandSpy.java
similarity index 83%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/spy/DiscordCommandSpy.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/spy/DiscordCommandSpy.java
index 906a810..12e572a 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/spy/DiscordCommandSpy.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/spy/DiscordCommandSpy.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.discord.spy;
+package org.modularsoft.zander.velocity.model.discord.spy;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/spy/DiscordSocialSpy.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/spy/DiscordSocialSpy.java
similarity index 85%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/spy/DiscordSocialSpy.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/spy/DiscordSocialSpy.java
index 720e948..f0cd649 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/discord/spy/DiscordSocialSpy.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/discord/spy/DiscordSocialSpy.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.discord.spy;
+package org.modularsoft.zander.velocity.model.discord.spy;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionCreate.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionCreate.java
similarity index 83%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionCreate.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionCreate.java
index d66a636..bec29b7 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionCreate.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionCreate.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.session;
+package org.modularsoft.zander.velocity.model.session;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionDestroy.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionDestroy.java
similarity index 82%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionDestroy.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionDestroy.java
index a90f0bf..15a9161 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionDestroy.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionDestroy.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.session;
+package org.modularsoft.zander.velocity.model.session;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionSwitch.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionSwitch.java
similarity index 83%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionSwitch.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionSwitch.java
index 45e5cc1..60ccba1 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/session/SessionSwitch.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/session/SessionSwitch.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.session;
+package org.modularsoft.zander.velocity.model.session;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/user/UserCreation.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/user/UserCreation.java
similarity index 84%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/user/UserCreation.java
rename to zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/user/UserCreation.java
index 2d85e33..ea9fdcf 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/model/user/UserCreation.java
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/model/user/UserCreation.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.model.user;
+package org.modularsoft.zander.velocity.model.user;
import com.google.gson.Gson;
import lombok.Builder;
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/ChatFreezeManager.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/ChatFreezeManager.java
new file mode 100644
index 0000000..bfcbfbc
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/ChatFreezeManager.java
@@ -0,0 +1,13 @@
+package org.modularsoft.zander.velocity.util;
+
+public class ChatFreezeManager {
+ private static boolean chatFrozen = false;
+
+ public static boolean isChatFrozen() {
+ return chatFrozen;
+ }
+
+ public static void setChatFrozen(boolean frozen) {
+ chatFrozen = frozen;
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/announcement/TipChatter.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/announcement/TipChatter.java
new file mode 100644
index 0000000..129fff7
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/announcement/TipChatter.java
@@ -0,0 +1,71 @@
+package org.modularsoft.zander.velocity.util.announcement;
+
+import com.jayway.jsonpath.JsonPath;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.event.ClickEvent;
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+public class TipChatter {
+
+ // Initialize the logger
+ private static final Logger logger = LoggerFactory.getLogger(TipChatter.class);
+
+ public static void startAnnouncementTipTask() {
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+ String announcementTipPrefix = ZanderVelocityMain.getConfig().getString(Route.from("announcementTipPrefix"));
+
+ // Create a ScheduledExecutorService with a single thread
+ ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
+
+ // Schedule the task to run every 10 seconds
+ scheduler.scheduleAtFixedRate(() -> {
+ try {
+ // GET request to fetch Announcement Tip.
+ Request req = Request.builder()
+ .setURL(BaseAPIURL + "/announcement/get?announcementType=tip")
+ .setMethod(Request.Method.GET)
+ .addHeader("x-access-token", APIKey)
+ .build();
+
+ Response res = req.execute();
+ String json = res.getBody();
+
+ String colourMessageFormat = JsonPath.read(json, "$.data[0].colourMessageFormat");
+ String link = JsonPath.read(json, "$.data[0].link");
+
+ // Log the color message format and link
+ logger.info("Announcement Tip: {}", colourMessageFormat);
+ logger.info("Link: {}", link);
+ logger.info("JSON: {}", json);
+
+ // Broadcast the message to all online players
+ ZanderVelocityMain.getProxy().getAllPlayers().forEach(player -> {
+ // Send the message to each player
+ char translate = '&';
+ Component message = LegacyComponentSerializer.legacy(translate).deserialize(announcementTipPrefix + " " + colourMessageFormat);
+
+ if (link != null && !link.isEmpty()) {
+ // Set the click event and reassign the modified message to the variable
+ message = message.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, link));
+ }
+ player.sendMessage(message);
+ });
+ } catch (Exception e) {
+ // Handle exceptions here
+ logger.error("Announcement Tip Failed, will try again later.", e);
+ System.out.println("Announcement Tip Failed, will try again in " + ZanderVelocityMain.getConfig().getString(Route.from("announcementTipInterval")) + " minutes.");
+ }
+ }, 0, ZanderVelocityMain.getConfig().getInt(Route.from("announcementTipInterval")), TimeUnit.MINUTES);
+ }
+}
diff --git a/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/api/Heartbeat.java b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/api/Heartbeat.java
new file mode 100644
index 0000000..ccc1bf8
--- /dev/null
+++ b/zander-velocity/src/main/java/org/modularsoft/zander/velocity/util/api/Heartbeat.java
@@ -0,0 +1,62 @@
+package org.modularsoft.zander.velocity.util.api;
+
+import com.jayway.jsonpath.JsonPath;
+import dev.dejvokep.boostedyaml.route.Route;
+import io.github.ModularEnigma.Request;
+import io.github.ModularEnigma.Response;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.modularsoft.zander.velocity.ZanderVelocityMain;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+public class Heartbeat {
+ public static void startHeartbeatTask() {
+ String BaseAPIURL = ZanderVelocityMain.getConfig().getString(Route.from("BaseAPIURL"));
+ String APIKey = ZanderVelocityMain.getConfig().getString(Route.from("APIKey"));
+
+ // Create a ScheduledExecutorService with a single thread
+ ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
+
+ // Schedule the task to run every 60 seconds
+ scheduler.scheduleAtFixedRate(() -> {
+ try {
+ // Your existing code here
+ // GET request to link to rules.
+ Request req = Request.builder()
+ .setURL(BaseAPIURL + "/heartbeat")
+ .setMethod(Request.Method.GET)
+ .addHeader("x-access-token", APIKey)
+ .build();
+
+ Response res = req.execute();
+ String json = res.getBody();
+ Boolean heartbeat = JsonPath.read(json, "$.success");
+ System.out.println("API Heartbeat Success");
+
+ // Check if the heartbeat is not successful
+ if (!heartbeat) {
+ // Kick all players
+ ZanderVelocityMain.getProxy().getAllPlayers().forEach(player -> {
+ Component message = Component.text("API Heartbeat Failed, the server is temporarily offline.")
+ .color(NamedTextColor.RED);
+ player.disconnect(message);
+ });
+ }
+ } catch (Exception e) {
+ // Handle exceptions here
+ e.printStackTrace();
+ ZanderVelocityMain.getLogger().error("API Heartbeat Failed, kicking all players until back online.");
+
+ // Kick all players
+ ZanderVelocityMain.getProxy().getAllPlayers().forEach(player -> {
+ Component message = Component.text("API Heartbeat Failed, the server is temporarily offline.")
+ .color(NamedTextColor.RED);
+ player.disconnect(message);
+ });
+ }
+ }, 0, 60, TimeUnit.SECONDS);
+ }
+}
diff --git a/zander-velocity/src/main/resources/config.yml b/zander-velocity/src/main/resources/config.yml
new file mode 100644
index 0000000..d993184
--- /dev/null
+++ b/zander-velocity/src/main/resources/config.yml
@@ -0,0 +1,8 @@
+config-version: 1
+
+BaseAPIURL: "http://localhost:8080/api"
+APIKey: "KEY"
+
+announcementMOTDTopLine: "&e&lMy &2&nMinecraft&r &6&oServer"
+announcementTipPrefix: "&7&l[&6&lTIP&7&l]&r "
+announcementTipInterval: 10
\ No newline at end of file
diff --git a/zander-proxy/dependency-reduced-pom.xml b/zander-waterfall/dependency-reduced-pom.xml
similarity index 97%
rename from zander-proxy/dependency-reduced-pom.xml
rename to zander-waterfall/dependency-reduced-pom.xml
index 3d049fe..68a3538 100644
--- a/zander-proxy/dependency-reduced-pom.xml
+++ b/zander-waterfall/dependency-reduced-pom.xml
@@ -6,7 +6,7 @@
1.0
4.0.0
- zander-proxy
+ zander-waterfall
1.0
diff --git a/zander-proxy/pom.xml b/zander-waterfall/pom.xml
similarity index 98%
rename from zander-proxy/pom.xml
rename to zander-waterfall/pom.xml
index 6ab30c2..4f1b606 100644
--- a/zander-proxy/pom.xml
+++ b/zander-waterfall/pom.xml
@@ -9,7 +9,7 @@
4.0.0
- zander-proxy
+ zander-waterfall
1.0
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/ConfigurationManager.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/ConfigurationManager.java
similarity index 97%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/ConfigurationManager.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/ConfigurationManager.java
index 9198705..9db4c44 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/ConfigurationManager.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/ConfigurationManager.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy;
+package org.modularsoft.zander.waterfall;
import com.google.common.io.ByteStreams;
import net.md_5.bungee.config.Configuration;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/ZanderProxyMain.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/ZanderProxyMain.java
similarity index 88%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/ZanderProxyMain.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/ZanderProxyMain.java
index c5b59db..1344fcb 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/ZanderProxyMain.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/ZanderProxyMain.java
@@ -1,13 +1,13 @@
-package org.modularsoft.zander.proxy;
+package org.modularsoft.zander.waterfall;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.api.plugin.Plugin;
-import org.modularsoft.zander.proxy.commands.*;
-import org.modularsoft.zander.proxy.events.*;
-import org.modularsoft.zander.proxy.util.announcement.TipChatter;
-import org.modularsoft.zander.proxy.util.api.Heartbeat;
+import org.modularsoft.zander.waterfall.commands.*;
+import org.modularsoft.zander.waterfall.events.*;
+import org.modularsoft.zander.waterfall.util.announcement.TipChatter;
+import org.modularsoft.zander.waterfall.util.api.Heartbeat;
public class ZanderProxyMain extends Plugin implements Listener {
private static ZanderProxyMain plugin;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/discord.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/discord.java
similarity index 91%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/discord.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/discord.java
index abc160f..75ed3ac 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/discord.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/discord.java
@@ -1,8 +1,8 @@
-package org.modularsoft.zander.proxy.commands;
+package org.modularsoft.zander.waterfall.commands;
import com.jayway.jsonpath.JsonPath;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
import net.md_5.bungee.api.ChatColor;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/ping.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/ping.java
similarity index 93%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/ping.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/ping.java
index 2b1432c..a9281f1 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/ping.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/ping.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.commands;
+package org.modularsoft.zander.waterfall.commands;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/rules.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/rules.java
similarity index 91%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/rules.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/rules.java
index ce79751..6eda87f 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/rules.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/rules.java
@@ -1,8 +1,8 @@
-package org.modularsoft.zander.proxy.commands;
+package org.modularsoft.zander.waterfall.commands;
import com.jayway.jsonpath.JsonPath;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
import net.md_5.bungee.api.ChatColor;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/website.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/website.java
similarity index 91%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/website.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/website.java
index 9e2aa32..4096f7d 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/commands/website.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/commands/website.java
@@ -1,8 +1,8 @@
-package org.modularsoft.zander.proxy.commands;
+package org.modularsoft.zander.waterfall.commands;
import com.jayway.jsonpath.JsonPath;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
import net.md_5.bungee.api.ChatColor;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserChatEvent.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserChatEvent.java
similarity index 91%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserChatEvent.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserChatEvent.java
index e2e4580..804d9bb 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserChatEvent.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserChatEvent.java
@@ -1,9 +1,9 @@
-package org.modularsoft.zander.proxy.events;
+package org.modularsoft.zander.waterfall.events;
import com.jayway.jsonpath.JsonPath;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
-import org.modularsoft.zander.proxy.model.Filter;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.model.Filter;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
import net.md_5.bungee.api.ChatColor;
@@ -12,7 +12,7 @@
import net.md_5.bungee.api.event.ChatEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
-import org.modularsoft.zander.proxy.model.discord.DiscordChat;
+import org.modularsoft.zander.waterfall.model.discord.DiscordChat;
import static com.jayway.jsonpath.Criteria.where;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserCommandSpyEvent.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserCommandSpyEvent.java
similarity index 90%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserCommandSpyEvent.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserCommandSpyEvent.java
index 529f5ea..f749a15 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserCommandSpyEvent.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserCommandSpyEvent.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.events;
+package org.modularsoft.zander.waterfall.events;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
@@ -7,9 +7,9 @@
import net.md_5.bungee.api.event.ChatEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
-import org.modularsoft.zander.proxy.model.discord.spy.DiscordCommandSpy;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.model.discord.spy.DiscordCommandSpy;
public class UserCommandSpyEvent implements Listener {
private ZanderProxyMain plugin = ZanderProxyMain.getInstance();
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnDisconnect.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnDisconnect.java
similarity index 89%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnDisconnect.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnDisconnect.java
index 278426a..2bb0e03 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnDisconnect.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnDisconnect.java
@@ -1,11 +1,11 @@
-package org.modularsoft.zander.proxy.events;
+package org.modularsoft.zander.waterfall.events;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
-import org.modularsoft.zander.proxy.model.session.SessionDestroy;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.model.session.SessionDestroy;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
-import org.modularsoft.zander.proxy.model.discord.DiscordLeave;
+import org.modularsoft.zander.waterfall.model.discord.DiscordLeave;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnLogin.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnLogin.java
similarity index 91%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnLogin.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnLogin.java
index fddba6e..fe866df 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnLogin.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnLogin.java
@@ -1,10 +1,10 @@
-package org.modularsoft.zander.proxy.events;
+package org.modularsoft.zander.waterfall.events;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
-import org.modularsoft.zander.proxy.model.discord.DiscordJoin;
-import org.modularsoft.zander.proxy.model.session.SessionCreate;
-import org.modularsoft.zander.proxy.model.user.UserCreation;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.model.discord.DiscordJoin;
+import org.modularsoft.zander.waterfall.model.session.SessionCreate;
+import org.modularsoft.zander.waterfall.model.user.UserCreation;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
import net.md_5.bungee.api.chat.TextComponent;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnProxyPing.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnProxyPing.java
similarity index 92%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnProxyPing.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnProxyPing.java
index 2eef48e..9e77780 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnProxyPing.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnProxyPing.java
@@ -1,8 +1,8 @@
-package org.modularsoft.zander.proxy.events;
+package org.modularsoft.zander.waterfall.events;
import com.jayway.jsonpath.JsonPath;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
import net.md_5.bungee.api.ChatColor;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnSwitch.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnSwitch.java
similarity index 90%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnSwitch.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnSwitch.java
index 1c9051b..900a08e 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserOnSwitch.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserOnSwitch.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.events;
+package org.modularsoft.zander.waterfall.events;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
@@ -7,10 +7,10 @@
import net.md_5.bungee.api.event.ServerConnectedEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
-import org.modularsoft.zander.proxy.model.discord.DiscordSwitch;
-import org.modularsoft.zander.proxy.model.session.SessionSwitch;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.model.discord.DiscordSwitch;
+import org.modularsoft.zander.waterfall.model.session.SessionSwitch;
import java.util.UUID;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserSocialSpyEvent.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserSocialSpyEvent.java
similarity index 88%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserSocialSpyEvent.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserSocialSpyEvent.java
index 9bab0e0..ee0f99e 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/events/UserSocialSpyEvent.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/events/UserSocialSpyEvent.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.events;
+package org.modularsoft.zander.waterfall.events;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
@@ -7,10 +7,9 @@
import net.md_5.bungee.api.event.ChatEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
-import org.modularsoft.zander.proxy.ConfigurationManager;
-import org.modularsoft.zander.proxy.ZanderProxyMain;
-import org.modularsoft.zander.proxy.model.discord.spy.DiscordCommandSpy;
-import org.modularsoft.zander.proxy.model.discord.spy.DiscordSocialSpy;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ZanderProxyMain;
+import org.modularsoft.zander.waterfall.model.discord.spy.DiscordSocialSpy;
import java.util.Arrays;
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/Filter.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/Filter.java
new file mode 100644
index 0000000..f52ce4a
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/Filter.java
@@ -0,0 +1,17 @@
+package org.modularsoft.zander.waterfall.model;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class Filter {
+
+ @Getter String content;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordChat.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordChat.java
new file mode 100644
index 0000000..2325604
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordChat.java
@@ -0,0 +1,19 @@
+package org.modularsoft.zander.waterfall.model.discord;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class DiscordChat {
+
+ @Getter String username;
+ @Getter String server;
+ @Getter String content;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordJoin.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordJoin.java
new file mode 100644
index 0000000..3378ab0
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordJoin.java
@@ -0,0 +1,17 @@
+package org.modularsoft.zander.waterfall.model.discord;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class DiscordJoin {
+
+ @Getter String username;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordLeave.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordLeave.java
new file mode 100644
index 0000000..63d7342
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordLeave.java
@@ -0,0 +1,17 @@
+package org.modularsoft.zander.waterfall.model.discord;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class DiscordLeave {
+
+ @Getter String username;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordSwitch.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordSwitch.java
new file mode 100644
index 0000000..ed5c772
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/DiscordSwitch.java
@@ -0,0 +1,18 @@
+package org.modularsoft.zander.waterfall.model.discord;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class DiscordSwitch {
+
+ @Getter String username;
+ @Getter String server;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/spy/DiscordCommandSpy.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/spy/DiscordCommandSpy.java
new file mode 100644
index 0000000..f12738f
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/spy/DiscordCommandSpy.java
@@ -0,0 +1,19 @@
+package org.modularsoft.zander.waterfall.model.discord.spy;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class DiscordCommandSpy {
+
+ @Getter String username;
+ @Getter String command;
+ @Getter String server;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/spy/DiscordSocialSpy.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/spy/DiscordSocialSpy.java
new file mode 100644
index 0000000..0a6cc8f
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/discord/spy/DiscordSocialSpy.java
@@ -0,0 +1,20 @@
+package org.modularsoft.zander.waterfall.model.discord.spy;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+@Builder
+public class DiscordSocialSpy {
+
+ @Getter String usernameFrom;
+ @Getter String usernameTo;
+ @Getter String directMessage;
+ @Getter String server;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionCreate.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionCreate.java
new file mode 100644
index 0000000..2bf7448
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionCreate.java
@@ -0,0 +1,20 @@
+package org.modularsoft.zander.waterfall.model.session;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+import java.util.UUID;
+
+@Builder
+public class SessionCreate {
+
+ @Getter UUID uuid;
+ @Getter String ipAddress;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionDestroy.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionDestroy.java
new file mode 100644
index 0000000..e7f875c
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionDestroy.java
@@ -0,0 +1,19 @@
+package org.modularsoft.zander.waterfall.model.session;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+import java.util.UUID;
+
+@Builder
+public class SessionDestroy {
+
+ @Getter UUID uuid;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionSwitch.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionSwitch.java
new file mode 100644
index 0000000..5bd82c8
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/session/SessionSwitch.java
@@ -0,0 +1,20 @@
+package org.modularsoft.zander.waterfall.model.session;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+import java.util.UUID;
+
+@Builder
+public class SessionSwitch {
+
+ @Getter UUID uuid;
+ @Getter String server;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/user/UserCreation.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/user/UserCreation.java
new file mode 100644
index 0000000..b645099
--- /dev/null
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/model/user/UserCreation.java
@@ -0,0 +1,20 @@
+package org.modularsoft.zander.waterfall.model.user;
+
+import com.google.gson.Gson;
+import lombok.Builder;
+import lombok.Getter;
+
+import java.util.UUID;
+
+@Builder
+public class UserCreation {
+
+ @Getter UUID uuid;
+ @Getter String username;
+
+ @Override
+ public String toString() {
+ return new Gson().toJson(this);
+ }
+
+}
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/util/announcement/TipChatter.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/util/announcement/TipChatter.java
similarity index 95%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/util/announcement/TipChatter.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/util/announcement/TipChatter.java
index b0948d8..5e94d3d 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/util/announcement/TipChatter.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/util/announcement/TipChatter.java
@@ -1,4 +1,4 @@
-package org.modularsoft.zander.proxy.util.announcement;
+package org.modularsoft.zander.waterfall.util.announcement;
import com.jayway.jsonpath.JsonPath;
import io.github.ModularEnigma.Request;
@@ -8,7 +8,7 @@
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.connection.ProxiedPlayer;
-import org.modularsoft.zander.proxy.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
diff --git a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/util/api/Heartbeat.java b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/util/api/Heartbeat.java
similarity index 95%
rename from zander-proxy/src/main/java/org/modularsoft/zander/proxy/util/api/Heartbeat.java
rename to zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/util/api/Heartbeat.java
index 22dd5dd..e31dbba 100644
--- a/zander-proxy/src/main/java/org/modularsoft/zander/proxy/util/api/Heartbeat.java
+++ b/zander-waterfall/src/main/java/org/modularsoft/zander/waterfall/util/api/Heartbeat.java
@@ -1,10 +1,10 @@
-package org.modularsoft.zander.proxy.util.api;
+package org.modularsoft.zander.waterfall.util.api;
import com.jayway.jsonpath.JsonPath;
import io.github.ModularEnigma.Request;
import io.github.ModularEnigma.Response;
import net.md_5.bungee.api.ProxyServer;
-import org.modularsoft.zander.proxy.ConfigurationManager;
+import org.modularsoft.zander.waterfall.ConfigurationManager;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
diff --git a/zander-proxy/src/main/resources/config.yml b/zander-waterfall/src/main/resources/config.yml
similarity index 100%
rename from zander-proxy/src/main/resources/config.yml
rename to zander-waterfall/src/main/resources/config.yml
diff --git a/zander-proxy/src/main/resources/nuvotifier.jar b/zander-waterfall/src/main/resources/nuvotifier.jar
similarity index 100%
rename from zander-proxy/src/main/resources/nuvotifier.jar
rename to zander-waterfall/src/main/resources/nuvotifier.jar
diff --git a/zander-proxy/src/main/resources/plugin.yml b/zander-waterfall/src/main/resources/plugin.yml
similarity index 100%
rename from zander-proxy/src/main/resources/plugin.yml
rename to zander-waterfall/src/main/resources/plugin.yml