mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-10-18 23:16:42 +08:00
修复了删除领地时不能退款的问题
This commit is contained in:
parent
15793e24b4
commit
99125fa924
@ -1,4 +1,4 @@
|
|||||||
name: Java CI-CD with Maven
|
name: Java CI-CD with Gradle
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
20
.github/workflows/main.yml
vendored
20
.github/workflows/main.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Java CI-CD with Maven
|
name: Java CI-CD with Gradle
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -11,20 +11,17 @@ jobs:
|
|||||||
permissions: write-all
|
permissions: write-all
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# 下载代码
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 21
|
||||||
# 安装 JDK
|
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: maven
|
cache: gradle
|
||||||
# Maven 打包
|
- name: "Build with Gradle"
|
||||||
- name: Build with Maven
|
run: ./gradlew buildPlugin
|
||||||
run: mvn -B package --file pom.xml
|
- name: "Copy jar to staging"
|
||||||
# 将打包好的 Jar 包 放到 staging 文件夹
|
run: mkdir staging && cp build/libs/*.jar staging/
|
||||||
- run: mkdir staging && cp target/*.jar staging
|
|
||||||
# 设置 jobs Maven pom 版本环境变量
|
# 设置 jobs Maven pom 版本环境变量
|
||||||
- name: Set Release version env variable
|
- name: Set Release version env variable
|
||||||
run: |
|
run: |
|
||||||
@ -32,7 +29,6 @@ jobs:
|
|||||||
- name: "Build & test"
|
- name: "Build & test"
|
||||||
run: |
|
run: |
|
||||||
echo "done!"
|
echo "done!"
|
||||||
# 上传文件并发布 Release
|
|
||||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
@ -4,7 +4,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "cn.lunadeer"
|
group = "cn.lunadeer"
|
||||||
version = "2.0.1-beta"
|
version = "2.0.2-beta"
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||||
|
@ -38,7 +38,7 @@ public class BukkitPlayerOperator implements AbstractOperator {
|
|||||||
if (isConsole()) {
|
if (isConsole()) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return ((Player) player).isOp();
|
return ((Player) player).isOp() || player.hasPermission("dominion.admin");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,12 +370,14 @@ public class DominionController {
|
|||||||
}
|
}
|
||||||
DominionDTO.delete(dominion);
|
DominionDTO.delete(dominion);
|
||||||
// 退还经济
|
// 退还经济
|
||||||
int count = 0;
|
int count;
|
||||||
if (Dominion.config.getEconomyOnlyXZ()) {
|
if (Dominion.config.getEconomyOnlyXZ()) {
|
||||||
|
count = dominion.getSquare();
|
||||||
for (DominionDTO sub_dominion : sub_dominions) {
|
for (DominionDTO sub_dominion : sub_dominions) {
|
||||||
count += sub_dominion.getSquare();
|
count += sub_dominion.getSquare();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
count = dominion.getVolume();
|
||||||
for (DominionDTO sub_dominion : sub_dominions) {
|
for (DominionDTO sub_dominion : sub_dominions) {
|
||||||
count += sub_dominion.getVolume();
|
count += sub_dominion.getVolume();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user