mirror of
https://github.com/CarmJos/UltraDepository.git
synced 2024-09-19 19:55:45 +00:00
启动时输出插件名
This commit is contained in:
parent
8b3e0586a2
commit
bc95c37476
48
pom.xml
48
pom.xml
@ -138,30 +138,30 @@
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-javadoc-plugin</artifactId>-->
|
||||
<!-- <version>3.2.0</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <classifier>javadoc</classifier>-->
|
||||
<!-- <links>-->
|
||||
<!-- <link>https://javadoc.io/doc/org.jetbrains/annotations/</link>-->
|
||||
<!-- </links>-->
|
||||
<!-- <detectJavaApiLink>false</detectJavaApiLink>-->
|
||||
<!-- <encoding>UTF-8</encoding>-->
|
||||
<!-- <charset>UTF-8</charset>-->
|
||||
<!-- <docencoding>UTF-8</docencoding>-->
|
||||
<!-- <locale>zh_CN</locale>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>attach-javadocs</id>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>jar</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<classifier>javadoc</classifier>
|
||||
<links>
|
||||
<link>https://javadoc.io/doc/org.jetbrains/annotations/</link>
|
||||
</links>
|
||||
<detectJavaApiLink>false</detectJavaApiLink>
|
||||
<encoding>UTF-8</encoding>
|
||||
<charset>UTF-8</charset>
|
||||
<docencoding>UTF-8</docencoding>
|
||||
<locale>zh_CN</locale>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
|
@ -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(" |_| |___/ ");
|
||||
}
|
||||
}
|
||||
|
27
src/test/java/PluginNameTest.java
Normal file
27
src/test/java/PluginNameTest.java
Normal file
@ -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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user