From 7fc64f506ea7ebc68fcb0a9e98351deed7c1d212 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 13 Dec 2021 16:24:25 +0800 Subject: Initial version. Supports both Velocity and BungeeCord. --- src/main/java/com/keuin/crosslink/BungeeMain.java | 24 ++++++++++++++++++++++ .../java/com/keuin/crosslink/VelocityMain.java | 21 +++++++++++++++++++ src/main/resources/bungee.yml | 5 +++++ 3 files changed, 50 insertions(+) create mode 100644 src/main/java/com/keuin/crosslink/BungeeMain.java create mode 100644 src/main/java/com/keuin/crosslink/VelocityMain.java create mode 100644 src/main/resources/bungee.yml (limited to 'src') diff --git a/src/main/java/com/keuin/crosslink/BungeeMain.java b/src/main/java/com/keuin/crosslink/BungeeMain.java new file mode 100644 index 0000000..01486be --- /dev/null +++ b/src/main/java/com/keuin/crosslink/BungeeMain.java @@ -0,0 +1,24 @@ +package com.keuin.crosslink; + +import net.md_5.bungee.api.plugin.Plugin; + +import java.util.logging.Logger; + +public class BungeeMain extends Plugin { + + private final Logger logger = getLogger(); + + @Override + public void onLoad() { + logger.info("CrossLink is loading in BungeeCord mode."); + } + + @Override + public void onEnable() { + } + + @Override + public void onDisable() { + } + +} \ No newline at end of file diff --git a/src/main/java/com/keuin/crosslink/VelocityMain.java b/src/main/java/com/keuin/crosslink/VelocityMain.java new file mode 100644 index 0000000..7123712 --- /dev/null +++ b/src/main/java/com/keuin/crosslink/VelocityMain.java @@ -0,0 +1,21 @@ +package com.keuin.crosslink; + +import com.google.inject.Inject; +import com.velocitypowered.api.plugin.Plugin; +import com.velocitypowered.api.proxy.ProxyServer; +import org.slf4j.Logger; + +@Plugin(id = "crosslink", name = "CrossLink", version = "1.0-SNAPSHOT", + description = "Link your grouped servers with external world.", authors = {"Keuin"}) +public class VelocityMain { + private final ProxyServer server; + private final Logger logger; + + @Inject + public VelocityMain(ProxyServer server, Logger logger) { + this.server = server; + this.logger = logger; + + logger.info("CrossLink is loading in Velocity mode."); + } +} \ No newline at end of file diff --git a/src/main/resources/bungee.yml b/src/main/resources/bungee.yml new file mode 100644 index 0000000..24811bf --- /dev/null +++ b/src/main/resources/bungee.yml @@ -0,0 +1,5 @@ +name: CrossLink +main: com.keuin.crosslink.BungeeMain +version: 1.0-SNAPSHOT +author: Keuin +description: Link your grouped servers with external world. \ No newline at end of file -- cgit v1.2.3