1
mirror of https://github.com/CarmJos/EasyPlugin.git synced 2026-06-05 00:58:17 +08:00

Compare commits

..

7 Commits

19 changed files with 60 additions and 19 deletions
+2 -3
View File
@@ -26,7 +26,7 @@ jobs:
server-password: MAVEN_TOKEN
- name: "Maven Deploy"
run: mvn -B -Pgithub deploy --file pom.xml -DskipTests
run: mvn -B -Pgithub deploy --file pom.xml -DskipTests -Dgpg.skip
env:
MAVEN_USERNAME: ${{ github.repository_owner }}
MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -42,9 +42,8 @@ jobs:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: "Maven Deploy"
run: mvn -B -Plocal deploy --file pom.xml -DskipTests
run: mvn -B -Plocal deploy --file pom.xml -DskipTests -Dgpg.skip
- name: "Copy artifacts"
run: |
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
- name: "Package"
run: mvn -B package --file pom.xml -Dmaven.javadoc.skip=true
run: mvn -B package --file pom.xml -Dmaven.javadoc.skip=true -Dgpg.skip
env:
MAVEN_USERNAME: ${{ github.repository_owner }}
MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}}
+4
View File
@@ -36,6 +36,9 @@
### 主要部分 (`/base`)
- Color [`easyplugin-color`](base/color)
- 颜色工具类模块,提供功能全面的MC颜色解析转换工具。
- 支持 `&+颜色代码`(原版颜色)、`§(#XXXXXX)`(RGB颜色) 与 `&<#XXXXXX>`(前后标注RGB颜色渐变)。
- Utils [`easyplugin-utils`](base/utils)
- 通用工具类模块,该模块中的内容支持在Bungee、Bukkit使用。
- 本模块提供
@@ -69,6 +72,7 @@
### 附属部分 (`/extension`)
- [PlaceholderAPI](https://www.spigotmc.org/resources/6245/) [`easyplugin-placeholderapi`](extension/papi)
- PlaceholderAPI 扩展模块,提供了方便的 PlaceholderAPI 变量注册方法。
- [Vault](https://github.com/MilkBowl/VaultAPI)* [`easyplugin-vault`](extension/vault)
## 开发
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>cc.carm.lib</groupId>
<artifactId>easyplugin-parent</artifactId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -117,7 +117,7 @@ public class CommonPagedGUI extends PagedGUI {
* @return 最后一页的页码
*/
public int getLastPageNumber() {
return (this.container.size() / range.length) + 1;
return (this.container.size() / range.length) + ((this.container.size() % range.length) == 0 ? 0 : 1);
}
/**
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>cc.carm.lib</groupId>
<artifactId>easyplugin-parent</artifactId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,9 @@
package cc.carm.lib.easyplugin.updatechecker;
import cc.carm.lib.githubreleases4j.GithubReleases4J;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitTask;
import org.jetbrains.annotations.NotNull;
import java.util.List;
@@ -31,6 +33,10 @@ public class GHUpdateChecker {
return of(plugin).createRunner(plugin.getDescription().getVersion());
}
public static @NotNull BukkitTask run(@NotNull Plugin plugin) {
return Bukkit.getScheduler().runTaskAsynchronously(plugin, runner(plugin));
}
protected final @NotNull Logger logger;
protected final @NotNull String owner;
protected final @NotNull String repo;
+2 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -21,6 +21,7 @@
<packaging>jar</packaging>
<name>EasyPlugin-PlaceholderAPI</name>
<description>EasyPlugin的 PlaceholderAPI 扩展模块,提供了方便的 PlaceholderAPI 变量注册方法。</description>
<dependencies>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.1</version>
<version>1.5.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+32 -1
View File
@@ -15,7 +15,7 @@
<groupId>cc.carm.lib</groupId>
<artifactId>easyplugin-parent</artifactId>
<packaging>pom</packaging>
<version>1.5.1</version>
<version>1.5.3</version>
<modules>
<module>base/color</module>
<module>base/utils</module>
@@ -205,6 +205,37 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>