From bc95c3747649533d30e357634d94954269db1056 Mon Sep 17 00:00:00 2001 From: CarmJos Date: Wed, 29 Dec 2021 23:36:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=97=B6=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 48 +++++++++---------- .../cc/carm/plugin/ultradepository/Main.java | 13 +++++ src/test/java/PluginNameTest.java | 27 +++++++++++ 3 files changed, 64 insertions(+), 24 deletions(-) create mode 100644 src/test/java/PluginNameTest.java diff --git a/pom.xml b/pom.xml index 917e697..e404501 100644 --- a/pom.xml +++ b/pom.xml @@ -138,30 +138,30 @@ false - - - - - - - - - - - - - - - - - - - - - - - - + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + javadoc + + https://javadoc.io/doc/org.jetbrains/annotations/ + + false + UTF-8 + UTF-8 + UTF-8 + zh_CN + + + + attach-javadocs + + jar + + + + org.apache.maven.plugins maven-compiler-plugin diff --git a/src/main/java/cc/carm/plugin/ultradepository/Main.java b/src/main/java/cc/carm/plugin/ultradepository/Main.java index dc30a9f..b0e34b9 100644 --- a/src/main/java/cc/carm/plugin/ultradepository/Main.java +++ b/src/main/java/cc/carm/plugin/ultradepository/Main.java @@ -41,6 +41,7 @@ public class Main extends JavaPlugin { public void onEnable() { instance = this; scheduler = new SchedulerUtils(this); + outputPlugin(); log(getName() + " " + getDescription().getVersion() + " &7开始加载..."); long startTime = System.currentTimeMillis(); @@ -101,6 +102,7 @@ public class Main extends JavaPlugin { @Override public void onDisable() { if (!initialized) return; + outputPlugin(); log(getName() + " " + getDescription().getVersion() + " 开始卸载..."); long startTime = System.currentTimeMillis(); @@ -174,4 +176,15 @@ public class Main extends JavaPlugin { command.setExecutor(executor); if (tabCompleter != null) command.setTabCompleter(tabCompleter); } + + public static void outputPlugin() { + log(" _ _ _ _ _____ _ _ "); + log("| | | | | | | __ \\ (_) | "); + log("| | | | | |_ _ __ __ _| | | | ___ _ __ ___ ___ _| |_ ___ _ __ _ _ "); + log("| | | | | __| '__/ _` | | | |/ _ \\ '_ \\ / _ \\/ __| | __/ _ \\| '__| | | |"); + log("| |__| | | |_| | | (_| | |__| | __/ |_) | (_) \\__ \\ | || (_) | | | |_| |"); + log(" \\____/|_|\\__|_| \\__,_|_____/ \\___| .__/ \\___/|___/_|\\__\\___/|_| \\__, |"); + log(" | | __/ |"); + log(" |_| |___/ "); + } } diff --git a/src/test/java/PluginNameTest.java b/src/test/java/PluginNameTest.java new file mode 100644 index 0000000..dcb385c --- /dev/null +++ b/src/test/java/PluginNameTest.java @@ -0,0 +1,27 @@ +import org.junit.Test; + +public class PluginNameTest { + + + @Test + public void test() { + outputPlugin(); + } + + + public static void outputPlugin() { + log(" _ _ _ _ _____ _ _ "); + log("| | | | | | | __ \\ (_) | "); + log("| | | | | |_ _ __ __ _| | | | ___ _ __ ___ ___ _| |_ ___ _ __ _ _ "); + log("| | | | | __| '__/ _` | | | |/ _ \\ '_ \\ / _ \\/ __| | __/ _ \\| '__| | | |"); + log("| |__| | | |_| | | (_| | |__| | __/ |_) | (_) \\__ \\ | || (_) | | | |_| |"); + log(" \\____/|_|\\__|_| \\__,_|_____/ \\___| .__/ \\___/|___/_|\\__\\___/|_| \\__, |"); + log(" | | __/ |"); + log(" |_| |___/ "); + } + + private static void log(String s) { + System.out.println(s); + } + +}