修复了删除领地时不能退款的问题
All checks were successful
Java CI-CD with Gradle / build (push) Successful in 25m57s

This commit is contained in:
zhangyuheng 2024-08-07 12:49:19 +08:00
parent 15793e24b4
commit 99125fa924
5 changed files with 14 additions and 16 deletions

View File

@ -1,4 +1,4 @@
name: Java CI-CD with Maven
name: Java CI-CD with Gradle
on:
push:

View File

@ -1,4 +1,4 @@
name: Java CI-CD with Maven
name: Java CI-CD with Gradle
on:
push:
@ -11,20 +11,17 @@ jobs:
permissions: write-all
runs-on: ubuntu-latest
steps:
# 下载代码
- uses: actions/checkout@v3
- name: Set up JDK 17
# 安装 JDK
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: maven
# Maven 打包
- name: Build with Maven
run: mvn -B package --file pom.xml
# 将打包好的 Jar 包 放到 staging 文件夹
- run: mkdir staging && cp target/*.jar staging
cache: gradle
- name: "Build with Gradle"
run: ./gradlew buildPlugin
- name: "Copy jar to staging"
run: mkdir staging && cp build/libs/*.jar staging/
# 设置 jobs Maven pom 版本环境变量
- name: Set Release version env variable
run: |
@ -32,7 +29,6 @@ jobs:
- name: "Build & test"
run: |
echo "done!"
# 上传文件并发布 Release
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"

View File

@ -4,7 +4,7 @@ plugins {
}
group = "cn.lunadeer"
version = "2.0.1-beta"
version = "2.0.2-beta"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))

View File

@ -38,7 +38,7 @@ public class BukkitPlayerOperator implements AbstractOperator {
if (isConsole()) {
return true;
} else {
return ((Player) player).isOp();
return ((Player) player).isOp() || player.hasPermission("dominion.admin");
}
}

View File

@ -370,12 +370,14 @@ public class DominionController {
}
DominionDTO.delete(dominion);
// 退还经济
int count = 0;
int count;
if (Dominion.config.getEconomyOnlyXZ()) {
count = dominion.getSquare();
for (DominionDTO sub_dominion : sub_dominions) {
count += sub_dominion.getSquare();
}
} else {
count = dominion.getVolume();
for (DominionDTO sub_dominion : sub_dominions) {
count += sub_dominion.getVolume();
}