From fb69fb1ffe57f49179bbad1ab85fae9775140a63 Mon Sep 17 00:00:00 2001 From: zhao <1040110848@qq.com> Date: Fri, 19 Jun 2020 16:08:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E8=AE=BE=E7=BD=AE=E4=B8=AD=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E4=BF=AE=E6=94=B9=E8=81=94=E5=90=88=E5=B0=81=E7=A6=81?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E7=9A=84=E5=9C=B0=E5=9D=80=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dependency-reduced-pom.xml | 40 +++++++++---------- .../UnionBanClientSpigot/ClientPlugin.java | 2 + .../GetServerStatusTask.java | 1 + src/main/resources/config.yml | 5 ++- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml index ef95d22..f9bd1d2 100644 --- a/dependency-reduced-pom.xml +++ b/dependency-reduced-pom.xml @@ -1,26 +1,26 @@ - 4.0.0 - cn.cnklp.studio - UnionBanClientSpigot - 1.0-SNAPSHOT - - - - maven-shade-plugin - 3.2.3 - - - package - - shade - - - true - - - + 4.0.0 + cn.cnklp.studio + UnionBanClientSpigot + 1.0-SNAPSHOT + + + + maven-shade-plugin + 3.2.3 + + + package + + shade + + + true + + + maven-compiler-plugin diff --git a/src/main/java/cn/cnklp/studio/UnionBanClientSpigot/ClientPlugin.java b/src/main/java/cn/cnklp/studio/UnionBanClientSpigot/ClientPlugin.java index f15700f..8bedf54 100644 --- a/src/main/java/cn/cnklp/studio/UnionBanClientSpigot/ClientPlugin.java +++ b/src/main/java/cn/cnklp/studio/UnionBanClientSpigot/ClientPlugin.java @@ -23,6 +23,8 @@ public class ClientPlugin extends JavaPlugin { Objects.requireNonNull(this.getCommand("unionban")).setExecutor(executor); Objects.requireNonNull(this.getCommand("unionban")).setTabCompleter(executor); saveDefaultConfig(); + ServerAddress = getConfig().getString("ServerAddress"); + getLogger().info("UnionBan Server address: " + ServerAddress); new LoginTask(this, Bukkit.getConsoleSender()).runTaskAsynchronously(this); } diff --git a/src/main/java/cn/cnklp/studio/UnionBanClientSpigot/GetServerStatusTask.java b/src/main/java/cn/cnklp/studio/UnionBanClientSpigot/GetServerStatusTask.java index 7d60a51..03f4626 100644 --- a/src/main/java/cn/cnklp/studio/UnionBanClientSpigot/GetServerStatusTask.java +++ b/src/main/java/cn/cnklp/studio/UnionBanClientSpigot/GetServerStatusTask.java @@ -58,6 +58,7 @@ public class GetServerStatusTask extends BukkitRunnable { @Override public void run() { sender.sendMessage("Querying server status..."); + sender.sendMessage("The UnionBan Server address is " + plugin.ServerAddress); try { String version = GetVersion(plugin.ServerAddress); sender.sendMessage("UnionBan Server is ON! Version: " + version); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index e30c526..6eeec84 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,4 +1,7 @@ -# Do NOT change this file manually! +# UnionBan server address +ServerAddress: "https://api.unionban.icu" +# Login information. +# Do NOT change these manually! username: "" password: "" api_key: "" \ No newline at end of file