新增上传到 maven central 仓库

This commit is contained in:
ZhangYuheng 2024-10-07 18:43:54 +08:00
parent 7f1e142d93
commit 79ce0c085a
3 changed files with 74 additions and 8 deletions

74
pom.xml
View File

@ -6,7 +6,34 @@
<groupId>cn.lunadeer</groupId>
<artifactId>MinecraftPluginUtils</artifactId>
<version>1.3.10-SNAPSHOT</version>
<version>1.3.10</version>
<description>lunadeer-minecraft-develop-utils</description>
<url>https://ssl.lunadeer.cn:14446/zhangyuheng/MinecraftPluginUtils</url>
<licenses>
<license>
<name>MIT</name>
<url>https://opensource.org/license/mit</url>
</license>
</licenses>
<developers>
<developer>
<id>zhangyuheng</id>
<name>zhangyuheng</name>
<email>zhangyuheng@lunadeer.cn</email>
<roles>
<role>Project Manager</role>
<role>Architect</role>
</roles>
</developer>
</developers>
<scm>
<connection>https://ssl.lunadeer.cn:14446/zhangyuheng/MinecraftPluginUtils.git</connection>
<developerConnection>scm:git:ssh://git@ssl.lunadeer.cn:14446/zhangyuheng/MinecraftPluginUtils.git</developerConnection>
<url>https://ssl.lunadeer.cn:14446/zhangyuheng/MinecraftPluginUtils</url>
</scm>
<properties>
<maven.compiler.source>17</maven.compiler.source>
@ -85,6 +112,7 @@
<build>
<plugins>
<!-- 源码插件 -->
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
@ -97,6 +125,50 @@
</execution>
</executions>
</plugin>
<!-- central发布插件 -->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.4.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
</configuration>
</plugin>
<!-- javadoc插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- gpg签名插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<configuration>
<executable>gpg</executable>
<keyname>zhangyuheng</keyname>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -42,7 +42,7 @@ public class ColorParser {
/**
* 获取称号的颜色化字符串
* 需要使用 ChatColor.translateAlternateColorCodes 方法对返回字符串进行处理
* &#FFFFFF -> &x&f&f&f&f&f
* &amp;#FFFFFF -&gt; &amp;x&amp;f&amp;f&amp;f&amp;f&amp;f
*
* @return String
*/

View File

@ -34,7 +34,6 @@ public class Scheduler {
*
* @param task The task to run
* @param delay The delay in ticks (20 ticks = 1 second)
* @return The scheduled task
*/
public static void runTaskLater(Runnable task, long delay) {
if (delay <= 0) {
@ -52,7 +51,6 @@ public class Scheduler {
* Run a task
*
* @param task The task to run
* @return The scheduled task
*/
public static void runTask(Runnable task) {
if (instance.isPaper) {
@ -68,7 +66,6 @@ public class Scheduler {
* @param task The task to run
* @param delay The delay in ticks (20 ticks = 1 second)
* @param period The period in ticks (20 ticks = 1 second)
* @return The scheduled task
*/
public static void runTaskRepeat(Runnable task, long delay, long period) {
if (instance.isPaper) {
@ -83,7 +80,6 @@ public class Scheduler {
*
* @param task The task to run
* @param delay The delay in milliseconds
* @return The scheduled task
*/
public static void runTaskLaterAsync(Runnable task, long delay) {
if (delay <= 0) {
@ -101,7 +97,6 @@ public class Scheduler {
* Run a task asynchronously
*
* @param task The task to run
* @return The scheduled task
*/
public static void runTaskAsync(Runnable task) {
if (instance.isPaper) {
@ -117,7 +112,6 @@ public class Scheduler {
* @param task The task to run
* @param delay The delay in milliseconds
* @param period The period in milliseconds
* @return The scheduled task
*/
public static void runTaskRepeatAsync(Runnable task, long delay, long period) {
if (instance.isPaper) {