Compare commits

...

63 Commits

Author SHA1 Message Date
11123822e4 add javadoc addr to doc 2024-10-17 21:04:48 +08:00
3f6b7c8a92 add api as submodule 2024-10-17 21:01:21 +08:00
3b09e6c885 remove api to standalone repo 2024-10-17 20:58:24 +08:00
2d2fb9a233 Enforce some api capabilities. 2024-10-17 15:25:27 +08:00
8e490ec57a Fix NoClassDefFoundError when using BlueMap-5.4 2024-10-15 17:35:39 +08:00
f1116fa281 Add InfoTool, which can be used to query dom info by click 2024-10-14 14:24:24 +08:00
dcf39f4097 add gitea ci-cd script with java 17 2024-10-14 10:48:57 +08:00
76a9b27ebd 优化文档 2024-10-14 01:42:22 +08:00
1b48eba6c7 修复了在1.21+版本下无法打开铁砧文本输入UI的问题 2024-10-12 15:19:13 +08:00
01b329a3e7 增强了DominionDTO的api能力,现支持修改信息 2024-10-12 11:01:49 +08:00
7fff24dacf 更新示例api插件地址 2024-10-11 11:52:03 +08:00
8e251504fa 修复了在迁移领地数据到新服务器后无法索引到世界的问题 2024-10-11 11:06:01 +08:00
5732fe0182 丰富了api的相关文档 javadoc,优化了部分api接口命名 2024-10-10 15:21:19 +08:00
a53733a0fb 修正文档错误 2024-10-09 17:25:43 +08:00
5734c97a58 修复一系列bug:
1. 修复在1.21下的CUI报错;
2. 现支持在1.20.1使用java17运行;
2024-10-09 14:45:59 +08:00
a86ce4624f 补充api javadoc 2024-10-08 10:28:49 +08:00
6f4d716d95 修复了lite不自动下载依赖的问题 2024-10-07 17:51:32 +08:00
9017402d06 修补cicd脚本 2024-10-07 16:38:19 +08:00
af7c4ad6b2 修补cicd脚本 2024-10-07 16:15:51 +08:00
6e57cada94 修补cicd脚本 2024-10-07 16:12:13 +08:00
d287b611ad 精简项目结构,提供两种不同下载版本 2024-10-07 16:10:19 +08:00
7046ef0391 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	build.gradle.kts
2024-10-07 16:09:57 +08:00
9eb69a4ecc 精简项目结构,提供两种不同下载版本 2024-10-07 16:09:10 +08:00
7f4ed745d7 文档增加笨蛋文档地址 2024-10-04 17:12:58 +08:00
7bf81b753d 文档增加示例项目地址 2024-10-04 16:27:59 +08:00
086e468f03 更新了API实现方案以支持扩展更多功能 2024-10-04 15:23:36 +08:00
e0e713c097 修复了spigot下偶发的多并发问题 2024-10-03 23:56:50 +08:00
be496aac0d 配置文件新增支持配置圈地最小限制 #28 2024-10-01 00:23:22 +08:00
ed6dc7c878
Merge pull request #27 from yunshuangqwq/patch-1 2024-09-28 16:27:05 +08:00
云霜
901be9f9af
只改了一个字 global-tp.md
厂里没人闲着无聊看了看文档发现了文档的有一个字错了
原:改
现:该
这下读着顺畅多了
2024-09-28 07:42:05 +08:00
897c6f17fd 新增数据库导入导出功能,便于迁移、备份数据库 2024-09-27 17:54:59 +08:00
ab838c5596 优化 en-us 语言文件除 Messages Config Flags 段落外的所有翻译。 2024-09-25 11:42:46 +08:00
1b2e193280 文档:修改配置文件中的部分默认值 2024-09-24 17:03:38 +08:00
d58b343b7c 修改配置文件中的部分默认值 2024-09-24 17:02:38 +08:00
c132f52f99 领地提示消息新增特殊占位符 #26 #19
- `{OWNER}`:会被自动替换为领地主人的名字;
- `{DOM}`:会被自动替换为领地名称;
2024-09-24 16:56:20 +08:00
5cc0750ee9 文档补充:新增允许配置领地默认提示消息 #26 2024-09-24 16:23:36 +08:00
458fc530df 新增允许配置领地默认提示消息 #26 2024-09-24 16:20:24 +08:00
ca2b42a84d 修复不打开权限组称号无法使用Papi的问题 2024-09-24 15:30:26 +08:00
a350e01e4b 实现了 api 支持 2024-09-23 15:04:56 +08:00
5bdd15f442 初步完成API定义 2024-09-23 00:54:16 +08:00
bc2c66bdd9 尝试添加api 2024-09-22 23:45:10 +08:00
e8271927ea 移除 WorldSettings 中的 Allow 配置
该功能本质上为 Limits.Amount,通过配置一个世界的数量为 0 可达到同样的效果。
2024-09-22 17:49:59 +08:00
ab0f2a95dd 修复文档无法查看访客权限文档的问题 2024-09-20 17:02:29 +08:00
6789828dec 介绍文档新增五张笑脸(中文特供) 2024-09-20 16:56:32 +08:00
0611600a72
Merge pull request #21 from cygbs/master
增文言以供古人用之。
2024-09-20 09:36:13 +08:00
cygbs
38c780302d
Fix some issues. 2024-09-20 04:26:33 +08:00
8dc6190f57 新增 PR action 自动检查 2024-09-19 21:27:11 +08:00
cygbs
6ed1f2eaf5
增文言以供古人用之。
为增插件之通用性,特此撰一文言翻译并交以「PR」。望君笑纳!
2024-09-19 18:39:26 +08:00
ff23753c62 补充了文档关于多语言更新说明 2024-09-19 17:26:00 +08:00
72a5a84a65 修复了在1.21中风弹的击退效果无法被拦截的漏洞 #17 2024-09-19 14:44:08 +08:00
99405c3828 领地环境设置新增“允许外部重力方块落入”权限 #18
如果禁止则领地外的重力方块进入领地触地时会变为掉落物,该权限默认为禁止
2024-09-19 14:22:13 +08:00
3a08f41906 新增 MessageDisplay 配置,允许服务器管理员配置消息提示位置 #20 2024-09-18 17:18:04 +08:00
b818fc2153 领地进入/离开提示语新增彩色支持,同时新增部分 Papi 变量 #20 2024-09-18 14:56:28 +08:00
bac6f90196 modify issue template 2024-09-17 20:34:08 +08:00
b6f0d8f8ef add translate note 2024-09-13 09:55:49 +08:00
9f788ae26d 整个烂活儿 2024-09-13 00:34:33 +08:00
e12dd87173 fix translate error 2024-09-12 13:38:20 +08:00
618b5c1810 modify language file load logic 2024-09-12 13:15:52 +08:00
66af44e789 add language support: en-us, ja-jp 2024-09-12 11:41:59 +08:00
dbbcf45266 更新了文档以及关联下载地址页面 2024-09-11 23:39:55 +08:00
b82e6d2364 测试 hangar 发布脚本 2024-09-11 16:09:26 +08:00
278de184ae 测试 hangar 发布脚本 2024-09-11 15:18:06 +08:00
268d17bd4f 测试 hangar 发布脚本 2024-09-11 15:03:47 +08:00
84 changed files with 3965 additions and 533 deletions

View File

@ -13,6 +13,12 @@ jobs:
uses: https://ssl.lunadeer.cn:14446/actions/checkout@v3
with:
fetch-depth: 0
- name: "Set up JDK 17"
uses: https://ssl.lunadeer.cn:14446/actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: "Set up JDK 21"
uses: https://ssl.lunadeer.cn:14446/actions/setup-java@v3
with:
@ -21,9 +27,13 @@ jobs:
cache: gradle
- name: "Build with Gradle"
run: |
./gradlew buildPlugin
- name: "Copy jar to staging"
run: mkdir staging && cp build/libs/*.jar staging/
./gradlew clean
./gradlew shadowJar -PBuildFull=false
./gradlew shadowJar -PBuildFull=true
- name: "Stage"
run: |
mkdir -p staging
mv build/libs/*.jar staging/
- name: "Build & test"
run: |
echo "done!"
@ -36,7 +46,7 @@ jobs:
- name: "Release"
uses: https://ssl.lunadeer.cn:14446/zhangyuheng/release-action@main
with:
note: " - 带 `original-` 前缀的文件无法用于运行,请下载不带此前缀的版本。"
note: " - `full` 后缀包含所有依赖直接安装即可使用,`lite` 后缀不包含任何依赖,会在第一次安装后启动时自动下载"
files: |-
staging/*.jar
api_key: '${{secrets.RELEASE_TOKEN}}'

View File

@ -15,10 +15,9 @@ assignees: ''
Bug复现步骤
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
1. 打开冰箱;
2. 将大象放入冰箱;
3. 关上冰箱。
**正常情况的表现**
@ -33,6 +32,7 @@ Bug复现步骤
- 服务器系统win, linux
- 服务端核心Paper、Spigot
- 服务端版本:
- 客户端版本:
- 插件版本:
**补充信息**

21
.github/workflows/check.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Merge/PR Build Check
on: [ pull_request ]
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up JDK 21"
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'zulu'
cache: gradle
- name: "Build with Gradle"
run: ./gradlew buildPlugin
- name: "Done!"
run: |
echo "done!"

View File

@ -7,10 +7,9 @@ on:
jobs:
build:
# 配置权限
permissions: write-all
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.set_tag.outputs.tag }}
steps:
- uses: actions/checkout@v3
- name: "Set up JDK 21"
@ -20,59 +19,44 @@ jobs:
distribution: 'zulu'
cache: gradle
- name: "Build with Gradle"
run: ./gradlew buildPlugin
- name: "Prepare release artifacts"
run: |
./gradlew clean
./gradlew shadowJar -PBuildFull=false
./gradlew shadowJar -PBuildFull=true
- name: "Stage"
run: |
mkdir -p staging
cp build/libs/*.jar staging/
- name: "Set release tag"
id: set_tag
run: echo "tag=${GITHUB_REF_NAME}" >> $GITHUB_ENV
github-release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
mv build/libs/*.jar staging/
- name: "Build & test"
run: |
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
echo "done!"
- name: "GitHub Release"
uses: marvinpinto/action-automatic-releases@latest
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ needs.build.outputs.release_tag }}"
automatic_release_tag: "${{ steps.build.outputs.TAG }}"
prerelease: false
files: |
build/libs/*.jar
modrinth-release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
staging/*.jar
- name: "Modrinth Release"
uses: dsx137/modrinth-release-action@main
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
TAG: ${{ needs.build.outputs.release_tag }}
with:
name: ${{ env.TAG }}
name: ${{ env.AUTOMATIC_RELEASES_TAG }}
project_id: vVZc7jAV
loaders: bukkit,folia,paper,purpur,spigot
game_versions: 1.20.1:1.20.6,1.21,1.21.1
version_number: ${{ env.TAG }}
version_number: ${{ env.AUTOMATIC_RELEASES_TAG }}
files: |
build/libs/*.jar
changelog: "See https://github.com/ColdeZhang/Dominion/releases/tag/${{ env.TAG }}"
staging/*-lite.jar
changelog: "See https://github.com/ColdeZhang/Dominion/releases/tag/${{ env.AUTOMATIC_RELEASES_TAG }}"
version_type: beta
featured: false
updatable: false
delete_old_files: false
hangar-release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Hangar Release"
env:
HANGAR_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
run: ./gradlew publishPluginPublicationToHangar --stacktrace
run: ./gradlew build publishPluginPublicationToHangar -PBuildFull=false

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "api"]
path = api
url = https://github.com/ColdeZhang/DominionAPI.git

View File

@ -17,13 +17,35 @@ enhancement you would like to see, why you think it would be useful, and any oth
### 🌐Translating
#### **Translate Plugin Messages** ![Crowdin](https://badges.crowdin.net/dominion/localized.svg)
#### **Translate Plugin Messages**
Since the plugin messages are translated by AI, there must be some mistakes in the translation. If you find any mistakes
(or inappropriate translations), there are two ways to help us improve the translation:
1. Fork the repository & clone the repository to your local.
2. Create a new branch for your translation.
3. Translate the plugin messages.
4. Commit & Push your changes to your fork.
5. Open a pull request, wait for your pull request to be reviewed and merged.
Plugin messages are located in the `languages` directory. Translate the files in the language you want to
- If the language you want to translate to does not exist, create a new file with the language code (e.g., `zh-cn.yml`
for Simplified Chinese).
- If the translation is not up-to-date, please update it from the `zh-cn.yml` file.
- Don't forget to leave your name in the header-comment of the file.
> Plugin messages was uploaded to Crowdin too, you can directly modify the translation on
> the [Crowdin project](https://crowdin.com/project/dominion).
>
> But we **NOT RECOMMEND** this way, because the translation on Crowdin may not be the latest.
>
> ![Crowdin](https://badges.crowdin.net/dominion/localized.svg)
If you would like to help translation, please refer to the [Crowdin project](https://crowdin.com/project/dominion).
#### **Translate Documentation**
1. Fork the repository & clone the repository to your local machine.
1. Fork the repository & clone the repository to your local.
2. Create a new branch for your translation.
3. Translate the documentation or plugin messages.
4. Commit & Push your changes to your fork.

View File

@ -2,14 +2,16 @@
<img src="logos/logo3.png" alt="" width="30%">
[![Documentation](https://img.shields.io/badge/Document-Online-70f3ff?logo=readthedocs)](https://dominion.lunadeer.cn/)
[![GitHub Repository](https://img.shields.io/badge/SourceCode-GitHub-blue?logo=github)](https://github.com/ColdeZhang/Dominion)
[![bStats](https://img.shields.io/badge/bStats-Statistics-eacd76?logo=google-analytics)](https://bstats.org/plugin/bukkit/Dominion/21445)
[![Hangar](https://img.shields.io/badge/Hangar-Page-bacac6?logo=paper)](https://hangar.papermc.io/zhangyuheng/Dominion)
[![Documentation](https://img.shields.io/badge/Document-Online-70f3ff?logo=readthedocs)](https://dominion.lunadeer.cn/)
[![Latest Build](https://img.shields.io/github/v/release/ColdeZhang/Dominion?label=LatestBuild&logo=github&color=0aa344)](https://github.com/ColdeZhang/Dominion/releases/latest)
[![Hangar](https://img.shields.io/badge/To-Hangar-004ee9)](https://hangar.papermc.io/zhangyuheng/Dominion)
[![Modrinth](https://img.shields.io/badge/To-Modrinth-1bd96a)](https://modrinth.com/plugin/zhangyuheng-dominion)
[![Spigot](https://img.shields.io/badge/To-Spigot-ed8106)](https://www.spigotmc.org/resources/dominion.119514/)
</div>
---
@ -28,12 +30,14 @@ For detail functions and features of Dominion, you can view [Introduction](intro
- 1.20.1+ (Bukkit、Spigot、Paper、Folia)
> You need to use Java21 to run your server. If you are still using Java17, you can safely replace it with Java21. In
> theory, version 1.20.1+ can be directly upgraded to Java21.
> Although this plugin supports Spigot, we strongly recommend that you upgrade your core to Paper or its forked (such as
> Purpur) for a better performance experience.
## For developer
Dominion provides some simple (for now) APIs for developers to build something amazing depends on Dominion. You can
take a look at [Developer](docs/en-us/developer.md) for more details.
## Help us improve
If you encounter any problems during use or have any suggestions, please feel free to open
@ -41,6 +45,10 @@ a [GitHub ISSUE](https://github.com/ColdeZhang/Dominion/issues) about your quest
For detailed contribution guidelines (such as **translation** etc.), please see [CONTRIBUTING](CONTRIBUTING.md)。
> **This project was developed under chinese-simplified originally. It's Multi-Language was translated by AI currently.**
> **So, there must be some mistakes in the translation. If you find any mistakes (or inappropriate translations), please**
> **feel free to modify it and submit a pull request. See [Translating](CONTRIBUTING.md#translating) for more details.**
## bStats Statics
<div align="center">

View File

@ -2,15 +2,17 @@
<img src="logos/logo3.png" alt="" width="30%">
[![Documentation](https://img.shields.io/badge/在线文档-点击跳转-70f3ff?logo=readthedocs)](https://dominion.lunadeer.cn/)
[![GitHub Repository](https://img.shields.io/badge/开源地址-GitHub-blue?logo=github)](https://github.com/ColdeZhang/Dominion)
[![bStats](https://img.shields.io/badge/bStats-Statistics-eacd76?logo=google-analytics)](https://bstats.org/plugin/bukkit/Dominion/21445)
[![Hangar](https://img.shields.io/badge/Hangar-Project-bacac6?logo=paper)](https://hangar.papermc.io/zhangyuheng/Dominion)
[![Documentation](https://img.shields.io/badge/在线文档-点击跳转-70f3ff?logo=readthedocs)](https://dominion.lunadeer.cn/)
[![Latest Build](https://img.shields.io/github/v/release/ColdeZhang/Dominion?label=%E6%9C%80%E6%96%B0%E6%9E%84%E5%BB%BA%E4%B8%8B%E8%BD%BD&logo=github&color=0aa344)](https://github.com/ColdeZhang/Dominion/releases/latest)
[![Latest Build](https://img.shields.io/github/v/release/ColdeZhang/Dominion?label=%E5%A4%87%E7%94%A8%E4%B8%8B%E8%BD%BD%E5%9C%B0%E5%9D%80&logo=gitea&color=0aa344)](https://ssl.lunadeer.cn:14446/mirror/Dominion/releases)
[![Hangar](https://img.shields.io/badge/To-Hangar-004ee9)](https://hangar.papermc.io/zhangyuheng/Dominion)
[![Modrinth](https://img.shields.io/badge/To-Modrinth-1bd96a)](https://modrinth.com/plugin/zhangyuheng-dominion)
[![Spigot](https://img.shields.io/badge/To-Spigot-ed8106)](https://www.spigotmc.org/resources/dominion.119514/)
</div>
---
@ -27,9 +29,6 @@ Dominion 是一个完全开源、免费,专为高版本开发,面向未来
- 1.20.1+ (Bukkit、Spigot、Paper、Folia)
> 需要使用 Java21 运行你的服务端,如果你还在使用 Java17 可以放心替换为 Java21理论上 1.20.1+ 版本的服务端核心可以直接升级到
> Java21 启动。
> 虽然本插件支持 Spigot但是我们强烈建议您将您的核心升级到 Paper 或其分支核心(如 Purpur以获得更好的性能体验。
## 帮助我们不断改进
@ -40,6 +39,21 @@ Dominion 是一个完全开源、免费,专为高版本开发,面向未来
交流QQ群309428300
## 开发者指南
Dominion 提供了一些简单只是暂时后续会逐步增强api的 API 供开发者基于 Dominion
构建一些更有趣的东西。您可以查看 [开发者指南](docs/zh-cn/developer.md) 了解更多细节。
## 整个烂活儿
| | Dominion | R插件 | G插件 |
|---------|----------|-----|-----|
| 纳秒级索引 | 😊 | 😑 | 😭 |
| 权限组快捷配置 | 😊 | 😭 | 😑 |
| 开源可信 | 😊 | 😑 | 😑 |
| 高版本快速跟进 | 😊 | 😭 | 😑 |
| 完全免费 | 😊 | 😑 | 😑 |
## 统计
<div align="center">

1
api Submodule

@ -0,0 +1 @@
Subproject commit 9a22a3e453ef0391741b6282a5b7f7219bfbbb0c

View File

@ -6,11 +6,15 @@ plugins {
id("io.papermc.hangar-publish-plugin") version "0.1.2"
}
var BuildFull = properties["BuildFull"].toString() == "true"
var libraries = listOf<String>()
libraries = libraries + "cn.lunadeer:MinecraftPluginUtils:2.0.7"
group = "cn.lunadeer"
version = "2.6.11-beta"
version = "2.14.1-beta"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
// utf-8
@ -29,7 +33,6 @@ allprojects {
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
maven("https://repo.mikeprimm.com/")
maven("https://ssl.lunadeer.cn:14454/repository/maven-snapshots/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
}
@ -38,8 +41,15 @@ allprojects {
compileOnly("us.dynmap:DynmapCoreAPI:3.4")
compileOnly("me.clip:placeholderapi:2.11.6")
implementation("cn.lunadeer:MinecraftPluginUtils:1.3.8-SNAPSHOT")
implementation("org.yaml:snakeyaml:2.0")
if (!BuildFull) {
libraries.forEach {
compileOnly(it)
}
} else {
libraries.forEach {
implementation(it)
}
}
}
tasks.processResources {
@ -53,6 +63,15 @@ allprojects {
filter {
it.replace("@version@", rootProject.version.toString())
}
if (!BuildFull) {
var libs = "libraries: ["
libraries.forEach {
libs += "$it,"
}
filter {
it.replace("libraries: [ ]", libs.substring(0, libs.length - 1) + "]")
}
}
}
}
@ -60,6 +79,8 @@ allprojects {
archiveClassifier.set("")
archiveVersion.set(project.version.toString())
dependsOn(tasks.withType<ProcessResources>())
// add -lite to the end of the file name if BuildLite is true or -full if BuildLite is false
archiveFileName.set("${project.name}-${project.version}${if (BuildFull) "-full" else "-lite"}.jar")
}
}
@ -74,7 +95,7 @@ tasks.shadowJar {
archiveVersion.set(project.version.toString())
}
tasks.register("buildPlugin") { // <<<< RUN THIS TASK TO BUILD PLUGIN
tasks.register("Clean&Build") { // <<<< RUN THIS TASK TO BUILD PLUGIN
dependsOn(tasks.clean)
dependsOn(tasks.shadowJar)
}

View File

@ -3,7 +3,7 @@ plugins {
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
// utf-8
@ -12,5 +12,6 @@ tasks.withType<JavaCompile> {
}
dependencies {
implementation(project(":api"))
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
}

View File

@ -1,11 +1,12 @@
package cn.lunadeer.dominion;
import cn.lunadeer.dominion.api.DominionAPI;
import cn.lunadeer.dominion.dtos.*;
import cn.lunadeer.dominion.utils.map.MapRender;
import cn.lunadeer.dominion.utils.MessageDisplay;
import cn.lunadeer.dominion.utils.Particle;
import cn.lunadeer.dominion.utils.ResMigration;
import cn.lunadeer.dominion.utils.map.MapRender;
import cn.lunadeer.minecraftpluginutils.AutoTimer;
import cn.lunadeer.minecraftpluginutils.Notification;
import cn.lunadeer.minecraftpluginutils.Scheduler;
import cn.lunadeer.minecraftpluginutils.XLogger;
import org.bukkit.GameMode;
@ -205,16 +206,7 @@ public class Cache {
});
}
/**
* 获取玩家当前所在领地
* 此方法会先判断缓存中是否有玩家当前所在领地如果没有则遍历所有领地判断玩家所在位置
* 如果玩家不在任何领地内则返回null
* 如果玩家在领地内则返回领地信息
*
* @param player 玩家
* @return 玩家当前所在领地
*/
public DominionDTO getPlayerCurrentDominion(Player player) {
public DominionDTO getPlayerCurrentDominion(@NotNull Player player) {
try (AutoTimer ignored = new AutoTimer(Dominion.config.TimerEnabled())) {
Integer last_in_dom_id = player_current_dominion_id.get(player.getUniqueId());
DominionDTO last_dominion = null;
@ -239,14 +231,18 @@ public class Cache {
return last_dominion;
}
if (last_dom_id != -1) {
String msg = last_dominion.getLeaveMessage();
msg = msg.replace("${DOM_NAME}", last_dominion.getName());
Notification.actionBar(player, msg);
MessageDisplay.show(player, Dominion.config.getMessageDisplayJoinLeave(),
last_dominion.getLeaveMessage()
.replace("{DOM}", last_dominion.getName())
.replace("{OWNER}", getPlayerName(last_dominion.getOwner()))
);
}
if (current_dom_id != -1) {
String msg = current_dominion.getJoinMessage();
msg = msg.replace("${DOM_NAME}", current_dominion.getName());
Notification.actionBar(player, msg);
MessageDisplay.show(player, Dominion.config.getMessageDisplayJoinLeave(),
current_dominion.getJoinMessage()
.replace("{DOM}", current_dominion.getName())
.replace("{OWNER}", getPlayerName(current_dominion.getOwner()))
);
}
lightOrNot(player, current_dominion); // 发光检查
@ -264,6 +260,10 @@ public class Cache {
}
}
public DominionDTO getDominionByLoc(@NotNull Location loc) {
return dominion_trees.getLocInDominionDTO(loc);
}
/**
* 玩家退出时调用 用于清除玩家当前所在领地
* 会将玩家当前所在领地设置为null
@ -343,28 +343,16 @@ public class Cache {
}
}
public DominionDTO getDominionByLoc(Location loc) {
return dominion_trees.getLocInDominionDTO(loc);
}
public GroupDTO getGroup(Integer id) {
public GroupDTO getGroup(@NotNull Integer id) {
return id_groups.get(id);
}
/**
* 获取玩家在指定领地的特权
* 如果玩家不存在特权则返回null
*
* @param player 玩家
* @param dominion 领地
* @return 特权表
*/
public MemberDTO getMember(Player player, DominionDTO dominion) {
public MemberDTO getMember(@NotNull Player player, cn.lunadeer.dominion.api.dtos.@NotNull DominionDTO dominion) {
if (!player_uuid_to_member.containsKey(player.getUniqueId())) return null;
return player_uuid_to_member.get(player.getUniqueId()).get(dominion.getId());
}
public MemberDTO getMember(UUID player_uuid, DominionDTO dominion) {
public MemberDTO getMember(@NotNull UUID player_uuid, cn.lunadeer.dominion.api.dtos.@NotNull DominionDTO dominion) {
if (!player_uuid_to_member.containsKey(player_uuid)) return null;
return player_uuid_to_member.get(player_uuid).get(dominion.getId());
}
@ -383,10 +371,20 @@ public class Cache {
return groups;
}
public DominionDTO getDominion(Integer id) {
public DominionDTO getDominion(@NotNull Integer id) {
return id_dominions.get(id);
}
public String getPlayerName(UUID uuid) {
if (!player_name_cache.containsKey(uuid)) {
PlayerDTO playerDTO = PlayerDTO.select(uuid);
if (playerDTO != null) {
player_name_cache.put(uuid, playerDTO.getLastKnownName());
}
}
return player_name_cache.getOrDefault(uuid, "Unknown");
}
public int getPlayerDominionCount(UUID player_uuid) {
int count = 0;
for (DominionDTO dominion : id_dominions.values()) {
@ -416,7 +414,7 @@ public class Cache {
return residence_data.get(player_uuid);
}
public List<DominionDTO> getDominions() {
public @NotNull List<cn.lunadeer.dominion.api.dtos.DominionDTO> getAllDominions() {
return new ArrayList<>(id_dominions.values());
}
@ -452,6 +450,7 @@ public class Cache {
private static final long UPDATE_INTERVAL = 1000 * 4;
private boolean recheckPlayerState = false; // 是否需要重新检查玩家状态发光飞行
public final Map<UUID, LocalDateTime> NextTimeAllowTeleport = new java.util.HashMap<>();
private final Map<UUID, String> player_name_cache = new HashMap<>();
private Map<UUID, List<ResMigration.ResidenceNode>> residence_data = null;
@ -595,7 +594,7 @@ public class Cache {
}
}
public @Nullable GroupDTO getPlayerUsingGroupTitle(UUID uuid) {
public @Nullable GroupDTO getPlayerUsingGroupTitle(@NotNull UUID uuid) {
if (!Dominion.config.getGroupTitleEnable()) {
return null;
}

View File

@ -118,6 +118,12 @@ public class Commands implements TabExecutor {
case "export_mca":
Operator.exportMca(sender, args);
break;
case "export_db":
Operator.exportDatabase(sender, args);
break;
case "import_db":
Operator.importDatabase(sender, args);
break;
// case "set_config":
// SetConfig.handler(sender, args);
// break;
@ -216,6 +222,9 @@ public class Commands implements TabExecutor {
"reload_cache",
"reload_config",
"export_mca",
"export_db",
"import_db",
"version",
"sys_config",
"all_dominion",
"set_map_color",

View File

@ -39,14 +39,14 @@ public final class Dominion extends JavaPlugin {
new Scheduler(this);
AutoClean.run();
Cache.instance = new Cache();
DominionInterface.instance = new DominionInterface();
if (config.getGroupTitleEnable()) {
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
new PlaceHolderApi(this);
} else {
XLogger.warn(Translation.Messages_PlaceholderAPINotFound);
config.setGroupTitleEnable(false);
}
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
new PlaceHolderApi(this);
}
if (config.getGroupTitleEnable() && !Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
XLogger.warn(Translation.Messages_PlaceholderAPINotFound);
config.setGroupTitleEnable(false);
}
new EventsRegister(this);

View File

@ -0,0 +1,76 @@
package cn.lunadeer.dominion;
import cn.lunadeer.dominion.api.DominionAPI;
import cn.lunadeer.dominion.dtos.DominionDTO;
import cn.lunadeer.dominion.dtos.Flag;
import cn.lunadeer.dominion.dtos.GroupDTO;
import cn.lunadeer.dominion.dtos.MemberDTO;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class DominionInterface implements DominionAPI {
public static DominionInterface instance;
@Override
public DominionDTO getPlayerCurrentDominion(@NotNull Player player) {
return Cache.instance.getPlayerCurrentDominion(player);
}
@Override
public DominionDTO getDominionByLoc(@NotNull Location loc) {
return Cache.instance.getDominionByLoc(loc);
}
@Override
public GroupDTO getGroup(@NotNull Integer id) {
return Cache.instance.getGroup(id);
}
@Override
public MemberDTO getMember(@NotNull Player player, cn.lunadeer.dominion.api.dtos.@NotNull DominionDTO dominion) {
return Cache.instance.getMember(player.getUniqueId(), dominion);
}
@Override
public MemberDTO getMember(@NotNull UUID player_uuid, cn.lunadeer.dominion.api.dtos.@NotNull DominionDTO dominion) {
return Cache.instance.getMember(player_uuid, dominion);
}
@Override
public DominionDTO getDominion(@NotNull Integer id) {
return Cache.instance.getDominion(id);
}
@Override
public @NotNull List<cn.lunadeer.dominion.api.dtos.DominionDTO> getAllDominions() {
return Cache.instance.getAllDominions();
}
@Override
public @Nullable GroupDTO getPlayerUsingGroupTitle(@NotNull UUID uuid) {
return Cache.instance.getPlayerUsingGroupTitle(uuid);
}
@Override
public @NotNull List<cn.lunadeer.dominion.api.dtos.Flag> getEnvironmentFlagsEnabled() {
return new ArrayList<>(Flag.getEnvironmentFlagsEnabled());
}
@Override
public @NotNull List<cn.lunadeer.dominion.api.dtos.Flag> getPrivilegeFlagsEnabled() {
return new ArrayList<>(Flag.getPrivilegeFlagsEnabled());
}
@Override
public cn.lunadeer.dominion.api.dtos.@Nullable Flag getFlagByName(@NotNull String flagName) {
return Flag.getFlag(flagName);
}
}

View File

@ -44,7 +44,7 @@ public class Helper {
if (dominion == null) return groups_name;
List<GroupDTO> groups = GroupDTO.selectByDominionId(dominion.getId());
for (GroupDTO group : groups) {
groups_name.add(group.getName());
groups_name.add(group.getNamePlain());
}
return groups_name;
}

View File

@ -2,7 +2,8 @@ package cn.lunadeer.dominion.commands;
import cn.lunadeer.dominion.Cache;
import cn.lunadeer.dominion.Dominion;
import cn.lunadeer.dominion.dtos.DominionDTO;
import cn.lunadeer.dominion.api.dtos.DominionDTO;
import cn.lunadeer.dominion.managers.DatabaseTables;
import cn.lunadeer.dominion.managers.Translation;
import cn.lunadeer.dominion.utils.map.MapRender;
import cn.lunadeer.minecraftpluginutils.GiteaReleaseCheck;
@ -52,7 +53,7 @@ public class Operator {
Scheduler.runTaskAsync(() -> {
Notification.info(sender, Translation.Commands_Operator_ExportingMCAList);
Map<String, List<String>> mca_cords = new HashMap<>();
List<DominionDTO> doms = Cache.instance.getDominions();
List<DominionDTO> doms = Cache.instance.getAllDominions();
for (DominionDTO dom : doms) {
if (dom.getWorld() == null) {
continue;
@ -140,6 +141,42 @@ public class Operator {
});
}
/**
* 导出数据库
* /dominion export_db [confirm]
*
* @param sender 发送者
* @param args 参数
*/
public static void exportDatabase(CommandSender sender, String[] args) {
if (!hasPermission(sender, "dominion.admin")) {
return;
}
if (args.length != 2 || !args[1].equals("confirm")) {
Notification.warn(sender, Translation.Commands_Operator_ExportDBConfirm);
return;
}
DatabaseTables.Export(sender);
}
/**
* 导入数据库
* /dominion import_db [confirm]
*
* @param sender 发送者
* @param args 参数
*/
public static void importDatabase(CommandSender sender, String[] args) {
if (!hasPermission(sender, "dominion.admin")) {
return;
}
if (args.length != 2 || !args[1].equals("confirm")) {
Notification.warn(sender, Translation.Commands_Operator_ImportDBConfirm);
return;
}
DatabaseTables.Import(sender);
}
public static void version(CommandSender sender, String[] args) {
if (!hasPermission(sender, "dominion.admin")) {
return;

View File

@ -43,7 +43,7 @@ public class Title {
}
DominionDTO dominion = Cache.instance.getDominion(group.getDomID());
if (dominion == null) {
Notification.error(sender, Translation.Commands_Title_GroupDominionNotExist, group.getName());
Notification.error(sender, Translation.Commands_Title_GroupDominionNotExist, group.getNamePlain());
return;
}
if (!dominion.getOwner().equals(bukkit_player.getUniqueId())) {
@ -53,12 +53,12 @@ public class Title {
return;
}
if (!Objects.equals(member.getGroupId(), group.getId())) {
Notification.error(sender, Translation.Commands_Title_NotGroupMember, group.getName());
Notification.error(sender, Translation.Commands_Title_NotGroupMember, group.getNamePlain());
return;
}
}
player.setUsingGroupTitleID(group.getId());
Notification.info(sender, Translation.Commands_Title_UseTitleSuccess, group.getName());
Notification.info(sender, Translation.Commands_Title_UseTitleSuccess, group.getNamePlain());
}
int page = getPage(args, 2);
TitleList.show(sender, page);

View File

@ -727,20 +727,28 @@ public class DominionController {
int x_length = x2 - x1;
int y_length = y2 - y1;
int z_length = z2 - z1;
if (x_length < 4 || y_length < 4 || z_length < 4) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeShouldBeGreaterThan4));
if (x_length < Dominion.config.getLimitSizeMinX(operator.getPlayer())) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeXShouldBeGreaterThan, Dominion.config.getLimitSizeMinX(operator.getPlayer())));
return true;
}
if (x_length > Dominion.config.getLimitSizeX(operator.getPlayer()) && Dominion.config.getLimitSizeX(operator.getPlayer()) > 0) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeXShouldBeLessThan, Dominion.config.getLimitSizeX(operator.getPlayer())));
if (y_length < Dominion.config.getLimitSizeMinY(operator.getPlayer())) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeYShouldBeGreaterThan, Dominion.config.getLimitSizeMinY(operator.getPlayer())));
return true;
}
if (y_length > Dominion.config.getLimitSizeY(operator.getPlayer()) && Dominion.config.getLimitSizeY(operator.getPlayer()) > 0) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeYShouldBeLessThan, Dominion.config.getLimitSizeY(operator.getPlayer())));
if (z_length < Dominion.config.getLimitSizeMinZ(operator.getPlayer())) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeZShouldBeGreaterThan, Dominion.config.getLimitSizeMinZ(operator.getPlayer())));
return true;
}
if (z_length > Dominion.config.getLimitSizeZ(operator.getPlayer()) && Dominion.config.getLimitSizeZ(operator.getPlayer()) > 0) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeZShouldBeLessThan, Dominion.config.getLimitSizeZ(operator.getPlayer())));
if (x_length > Dominion.config.getLimitSizeMaxX(operator.getPlayer()) && Dominion.config.getLimitSizeMaxX(operator.getPlayer()) > 0) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeXShouldBeLessThan, Dominion.config.getLimitSizeMaxX(operator.getPlayer())));
return true;
}
if (y_length > Dominion.config.getLimitSizeMaxY(operator.getPlayer()) && Dominion.config.getLimitSizeMaxY(operator.getPlayer()) > 0) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeYShouldBeLessThan, Dominion.config.getLimitSizeMaxY(operator.getPlayer())));
return true;
}
if (z_length > Dominion.config.getLimitSizeMaxZ(operator.getPlayer()) && Dominion.config.getLimitSizeMaxZ(operator.getPlayer()) > 0) {
operator.setResponse(FAIL.addMessage(Translation.Messages_SizeZShouldBeLessThan, Dominion.config.getLimitSizeMaxZ(operator.getPlayer())));
return true;
}
if (y2 > Dominion.config.getLimitMaxY(operator.getPlayer())) {

View File

@ -71,7 +71,7 @@ public class MemberController {
}
GroupDTO group = GroupDTO.select(privilege.getGroupId());
if (group != null) {
operator.setResponse(FAIL.addMessage(Translation.Messages_PlayerBelongToGroup, player_name, group.getName()));
operator.setResponse(FAIL.addMessage(Translation.Messages_PlayerBelongToGroup, player_name, group.getNamePlain()));
return;
}
if ((flag.equals("admin") || isAdmin(privilege)) && notOwner(operator, dominion)) {

View File

@ -2,6 +2,7 @@ package cn.lunadeer.dominion.dtos;
import cn.lunadeer.dominion.Cache;
import cn.lunadeer.dominion.Dominion;
import cn.lunadeer.dominion.api.dtos.Flag;
import cn.lunadeer.minecraftpluginutils.XLogger;
import cn.lunadeer.minecraftpluginutils.databse.DatabaseManager;
import cn.lunadeer.minecraftpluginutils.databse.Field;
@ -10,6 +11,7 @@ import cn.lunadeer.minecraftpluginutils.databse.syntax.InsertRow;
import cn.lunadeer.minecraftpluginutils.databse.syntax.UpdateRow;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@ -17,7 +19,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
public class DominionDTO {
public class DominionDTO implements cn.lunadeer.dominion.api.dtos.DominionDTO {
private static List<DominionDTO> query(String sql, Object... args) {
List<DominionDTO> dominions = new ArrayList<>();
try (ResultSet rs = DatabaseManager.instance.query(sql, args)) {
@ -45,7 +47,7 @@ public class DominionDTO {
Integer parentDomId = rs.getInt("parent_dom_id");
String tp_location = rs.getString("tp_location");
Map<Flag, Boolean> flags = new HashMap<>();
for (Flag f : Flag.getDominionFlagsEnabled()) {
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getDominionFlagsEnabled()) {
flags.put(f, rs.getBoolean(f.getFlagName()));
}
String color = rs.getString("color");
@ -88,7 +90,7 @@ public class DominionDTO {
String sql = "SELECT * FROM dominion WHERE id = ? AND id > 0;";
List<DominionDTO> dominions = query(sql, id);
if (dominions.isEmpty()) return null;
return dominions.getFirst();
return dominions.get(0);
}
public static List<DominionDTO> selectByParentId(World world, Integer parentId) {
@ -112,7 +114,7 @@ public class DominionDTO {
String sql = "SELECT * FROM dominion WHERE name = ? AND id > 0;";
List<DominionDTO> dominions = query(sql, name);
if (dominions.isEmpty()) return null;
return dominions.getFirst();
return dominions.get(0);
}
public static DominionDTO insert(DominionDTO dominion) {
@ -125,14 +127,14 @@ public class DominionDTO {
.field(dominion.parentDomId)
.field(dominion.joinMessage).field(dominion.leaveMessage)
.field(dominion.tp_location);
for (Flag f : Flag.getDominionFlagsEnabled()) {
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getDominionFlagsEnabled()) {
insert.field(new Field(f.getFlagName(), f.getDefaultValue()));
}
try (ResultSet rs = insert.execute()) {
Cache.instance.loadDominions();
List<DominionDTO> dominions = getDTOFromRS(rs);
if (dominions.isEmpty()) return null;
return dominions.getFirst();
return dominions.get(0);
} catch (SQLException e) {
DatabaseManager.handleDatabaseError("DominionDTO.insert ", e, insert.toString());
return null;
@ -185,6 +187,8 @@ public class DominionDTO {
this.y2.value = y2;
this.z2.value = z2;
this.parentDomId.value = parentDomId;
this.joinMessage.value = Dominion.config.getDefaultJoinMessage();
this.leaveMessage.value = Dominion.config.getDefaultLeaveMessage();
}
public DominionDTO(UUID owner, String name, @NotNull World world,
@ -207,8 +211,8 @@ public class DominionDTO {
private final Field y2 = new Field("y2", FieldType.INT);
private final Field z2 = new Field("z2", FieldType.INT);
private final Field parentDomId = new Field("parent_dom_id", -1);
private final Field joinMessage = new Field("join_message", "欢迎来到 ${DOM_NAME}");
private final Field leaveMessage = new Field("leave_message", "你正在离开 ${DOM_NAME},欢迎下次光临~");
private final Field joinMessage = new Field("join_message", "");
private final Field leaveMessage = new Field("leave_message", "");
private final Map<Flag, Boolean> flags = new HashMap<>();
private final Field tp_location = new Field("tp_location", "default");
private final Field color = new Field("color", "#00BFFF");
@ -216,11 +220,13 @@ public class DominionDTO {
// getters and setters
public Integer getId() {
@Override
public @NotNull Integer getId() {
return (Integer) id.value;
}
public UUID getOwner() {
@Override
public @NotNull UUID getOwner() {
return UUID.fromString((String) owner.value);
}
@ -232,36 +238,48 @@ public class DominionDTO {
List<DominionDTO> dominions = getDTOFromRS(rs);
if (dominions.isEmpty()) return null;
Cache.instance.loadDominions((Integer) id.value);
return dominions.getFirst();
return dominions.get(0);
} catch (SQLException e) {
DatabaseManager.handleDatabaseError("DominionDTO.doUpdate ", e, updateRow.toString());
return null;
}
}
@Override
public DominionDTO setOwner(UUID owner) {
this.owner.value = owner.toString();
return doUpdate(new UpdateRow().field(this.owner));
}
public String getName() {
@Override
public DominionDTO setOwner(Player owner) {
this.owner.value = owner.getUniqueId().toString();
return doUpdate(new UpdateRow().field(this.owner));
}
@Override
public @NotNull String getName() {
return (String) name.value;
}
@Override
public DominionDTO setName(String name) {
this.name.value = name;
return doUpdate(new UpdateRow().field(this.name));
}
@Override
public @Nullable World getWorld() {
return Dominion.instance.getServer().getWorld(getWorldUid());
}
public UUID getWorldUid() {
@Override
public @NotNull UUID getWorldUid() {
return UUID.fromString((String) world_uid.value);
}
public Integer getX1() {
@Override
public @NotNull Integer getX1() {
return (Integer) x1.value;
}
@ -270,7 +288,8 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(this.x1));
}
public Integer getY1() {
@Override
public @NotNull Integer getY1() {
return (Integer) y1.value;
}
@ -279,7 +298,8 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(this.y1));
}
public Integer getZ1() {
@Override
public @NotNull Integer getZ1() {
return (Integer) z1.value;
}
@ -288,7 +308,8 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(this.z1));
}
public Integer getX2() {
@Override
public @NotNull Integer getX2() {
return (Integer) x2.value;
}
@ -297,7 +318,8 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(this.x2));
}
public Integer getY2() {
@Override
public @NotNull Integer getY2() {
return (Integer) y2.value;
}
@ -306,7 +328,8 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(this.y2));
}
public Integer getZ2() {
@Override
public @NotNull Integer getZ2() {
return (Integer) z2.value;
}
@ -315,43 +338,53 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(this.z2));
}
public Integer getSquare() {
@Override
public @NotNull Integer getSquare() {
return getWidthX() * getWidthZ();
}
public Integer getVolume() {
@Override
public @NotNull Integer getVolume() {
return getSquare() * getHeight();
}
public Integer getWidthX() {
@Override
public @NotNull Integer getWidthX() {
return getX2() - getX1();
}
public Integer getHeight() {
@Override
public @NotNull Integer getHeight() {
return getY2() - getY1();
}
public Integer getWidthZ() {
@Override
public @NotNull Integer getWidthZ() {
return getZ2() - getZ1();
}
public Integer getParentDomId() {
@Override
public @NotNull Integer getParentDomId() {
return (Integer) parentDomId.value;
}
public String getJoinMessage() {
@Override
public @NotNull String getJoinMessage() {
return (String) joinMessage.value;
}
@Override
public DominionDTO setJoinMessage(String joinMessage) {
this.joinMessage.value = joinMessage;
return doUpdate(new UpdateRow().field(this.joinMessage));
}
public String getLeaveMessage() {
@Override
public @NotNull String getLeaveMessage() {
return (String) leaveMessage.value;
}
@Override
public DominionDTO setLeaveMessage(String leaveMessage) {
this.leaveMessage.value = leaveMessage;
return doUpdate(new UpdateRow().field(this.leaveMessage));
@ -362,12 +395,28 @@ public class DominionDTO {
return flags.get(flag);
}
public DominionDTO setFlagValue(Flag flag, Boolean value) {
@Override
public @NotNull Map<Flag, Boolean> getEnvironmentFlagValue() {
return flags.entrySet().stream()
.filter(e -> e.getKey().isEnvironmentFlag())
.collect(HashMap::new, (m, e) -> m.put(e.getKey(), e.getValue()), HashMap::putAll);
}
@Override
public @NotNull Map<Flag, Boolean> getGuestPrivilegeFlagValue() {
return flags.entrySet().stream()
.filter(e -> !e.getKey().isEnvironmentFlag())
.collect(HashMap::new, (m, e) -> m.put(e.getKey(), e.getValue()), HashMap::putAll);
}
@Override
public DominionDTO setFlagValue(@NotNull Flag flag, @NotNull Boolean value) {
flags.put(flag, value);
Field flagField = new Field(flag.getFlagName(), value);
return doUpdate(new UpdateRow().field(flagField));
}
@Override
public DominionDTO setXYZ(Integer x1, Integer y1, Integer z1, Integer x2, Integer y2, Integer z2) {
this.x1.value = x1;
this.y1.value = y1;
@ -375,9 +424,25 @@ public class DominionDTO {
this.x2.value = x2;
this.y2.value = y2;
this.z2.value = z2;
if (x1 > x2) {
int tmp = x1;
this.x1.value = x2;
this.x2.value = tmp;
}
if (y1 > y2) {
int tmp = y1;
this.y1.value = y2;
this.y2.value = tmp;
}
if (z1 > z2) {
int tmp = z1;
this.z1.value = z2;
this.z2.value = tmp;
}
return doUpdate(new UpdateRow().field(this.x1).field(this.y1).field(this.z1).field(this.x2).field(this.y2).field(this.z2));
}
@Override
public DominionDTO setXYZ(int[] cords) {
if (cords.length == 6) {
return setXYZ(cords[0], cords[1], cords[2], cords[3], cords[4], cords[5]);
@ -388,6 +453,7 @@ public class DominionDTO {
}
@Override
public Location getTpLocation() {
if (Objects.equals(tp_location.value, "default")) {
return null;
@ -410,11 +476,13 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(tp_location));
}
public Location getLocation1() {
@Override
public @NotNull Location getLocation1() {
return new Location(getWorld(), getX1(), getY1(), getZ1());
}
public Location getLocation2() {
@Override
public @NotNull Location getLocation2() {
return new Location(getWorld(), getX2(), getY2(), getZ2());
}
@ -423,22 +491,27 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(this.color));
}
@Override
public int getColorR() {
return Integer.valueOf(getColor().substring(1, 3), 16);
}
@Override
public int getColorG() {
return Integer.valueOf(getColor().substring(3, 5), 16);
}
@Override
public int getColorB() {
return Integer.valueOf(getColor().substring(5, 7), 16);
}
public String getColor() {
@Override
public @NotNull String getColor() {
return (String) color.value;
}
@Override
public int getColorHex() {
return (getColorR() << 16) + (getColorG() << 8) + getColorB();
}

View File

@ -7,13 +7,14 @@ import cn.lunadeer.minecraftpluginutils.XLogger;
import cn.lunadeer.minecraftpluginutils.i18n.Localization;
import com.alibaba.fastjson.JSONObject;
import org.bukkit.configuration.file.YamlConfiguration;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.IOException;
import java.text.Collator;
import java.util.*;
public enum Flag {
public enum Flag implements cn.lunadeer.dominion.api.dtos.Flag {
ANCHOR("anchor", "重生锚", "是否允许设置/使用重生锚", false, false, true),
ANIMAL_KILLING("animal_killing", "对动物造成伤害", "是否允许对动物造成伤害", false, false, true),
ANIMAL_SPAWN("animal_spawn", "动物生成(繁殖)", "是否允许动物生成(包括繁殖)", true, true, false),
@ -44,6 +45,7 @@ public enum Flag {
FLOW_IN_PROTECTION("flow_in_protection", "外部流体是否可以进入", "包含:岩浆、水(不会阻止领地内部的流体蔓延)", false, true, true),
FLY("fly", "飞行", "不是翅鞘飞行,是类似于创造模式的飞行", false, false, false),
GLOW("glow", "玩家发光", "类似光灵箭的高亮效果", false, false, true),
GRAVITY_BLOCK("gravity_block", "允许外部重力方块落入", "如果禁止则领地外重力方块进入领地会变为掉落物", false, true, true),
HARVEST("harvest", "收获", "收获庄稼、作物", false, false, true),
HONEY("honey", "蜂巢交互", "是否可以采蜂蜜", false, false, true),
HOOK("hook", "使用钓钩", "是否可以使用钓钩", false, false, true),
@ -100,26 +102,36 @@ public enum Flag {
this.enable = enable;
}
public String getFlagName() {
@Override
public @NotNull String getFlagName() {
return flag_name;
}
public String getDisplayName() {
@Override
public @NotNull String getDisplayName() {
return display_name;
}
public String getDescription() {
@Override
public @NotNull String getDescription() {
return description;
}
public Boolean getDefaultValue() {
@Override
public @NotNull Boolean getDefaultValue() {
return default_value;
}
public Boolean getEnable() {
@Override
public @NotNull Boolean getEnable() {
return enable;
}
@Override
public @NotNull Boolean isEnvironmentFlag() {
return dominion_only;
}
public void setDisplayName(String displayName) {
this.display_name = displayName;
}
@ -148,7 +160,24 @@ public enum Flag {
return Arrays.asList(Flag.values());
}
public static List<Flag> getDominionOnlyFlagsEnabled() {
public static List<Flag> getDominionFlagsEnabled() {
List<Flag> flags = new ArrayList<>();
for (Flag flag : Flag.values()) {
if (!flag.enable) {
continue;
}
flags.add(flag);
}
Comparator<Object> comparator = Collator.getInstance(java.util.Locale.CHINA);
flags.sort((o1, o2) -> comparator.compare(o1.getDisplayName(), o2.getDisplayName()));
return flags;
}
public static boolean isDominionOnlyFlag(String flagName) {
return getFlag(flagName).dominion_only;
}
public static List<Flag> getEnvironmentFlagsEnabled() {
List<Flag> flags = new ArrayList<>();
for (Flag flag : Flag.values()) {
if (!flag.dominion_only) {
@ -164,28 +193,6 @@ public enum Flag {
return flags;
}
public static boolean isDominionOnlyFlag(String flagName) {
return getFlag(flagName).dominion_only;
}
public static List<Flag> getDominionFlagsEnabled() {
List<Flag> flags = new ArrayList<>();
for (Flag flag : Flag.values()) {
if (!flag.enable) {
continue;
}
flags.add(flag);
}
Comparator<Object> comparator = Collator.getInstance(java.util.Locale.CHINA);
flags.sort((o1, o2) -> comparator.compare(o1.getDisplayName(), o2.getDisplayName()));
return flags;
}
public static List<Flag> getAllDominionFlags() {
return new ArrayList<>(Arrays.asList(Flag.values()));
}
public static List<Flag> getPrivilegeFlagsEnabled() {
List<Flag> flags = new ArrayList<>();
for (Flag flag : Flag.values()) {
@ -202,6 +209,10 @@ public enum Flag {
return flags;
}
public static List<Flag> getAllDominionFlags() {
return new ArrayList<>(Arrays.asList(Flag.values()));
}
public static List<Flag> getAllPrivilegeFlags() {
List<Flag> flags = new ArrayList<>();
for (Flag flag : Flag.values()) {

View File

@ -2,6 +2,7 @@ package cn.lunadeer.dominion.dtos;
import cn.lunadeer.dominion.Cache;
import cn.lunadeer.dominion.Dominion;
import cn.lunadeer.dominion.api.dtos.Flag;
import cn.lunadeer.minecraftpluginutils.ColorParser;
import cn.lunadeer.minecraftpluginutils.databse.DatabaseManager;
import cn.lunadeer.minecraftpluginutils.databse.Field;
@ -9,6 +10,8 @@ import cn.lunadeer.minecraftpluginutils.databse.FieldType;
import cn.lunadeer.minecraftpluginutils.databse.syntax.InsertRow;
import cn.lunadeer.minecraftpluginutils.databse.syntax.UpdateRow;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.ResultSet;
import java.util.ArrayList;
@ -16,69 +19,92 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class GroupDTO {
public class GroupDTO implements cn.lunadeer.dominion.api.dtos.GroupDTO {
Field id = new Field("id", FieldType.INT);
Field domID = new Field("dom_id", FieldType.INT);
Field name = new Field("name", FieldType.STRING);
Field name_raw = new Field("name", FieldType.STRING);
Field admin = new Field("admin", FieldType.BOOLEAN);
Field name_colored = new Field("name_colored", FieldType.STRING);
Field name_color = new Field("name_colored", FieldType.STRING);
private final Map<Flag, Boolean> flags = new HashMap<>();
public Integer getId() {
@Override
public @NotNull Integer getId() {
return (Integer) id.value;
}
public Integer getDomID() {
@Override
public @NotNull Integer getDomID() {
return (Integer) domID.value;
}
public String getName() {
return (String) name.value;
@Override
public @NotNull String getNameRaw() {
return (String) name_color.value;
}
public Component getNameColoredComponent() {
@Override
public @NotNull String getNamePlain() {
return (String) name_raw.value;
}
@Override
public @NotNull Component getNameColoredComponent() {
String with_pre_suf = "&#ffffff" +
Dominion.config.getGroupTitlePrefix() +
(String) name_colored.value +
(String) name_color.value +
"&#ffffff" +
Dominion.config.getGroupTitleSuffix();
return ColorParser.getComponentType(with_pre_suf);
}
public String getNameColoredBukkit() {
@Override
public @NotNull String getNameColoredBukkit() {
String with_pre_suf = "&#ffffff" +
Dominion.config.getGroupTitlePrefix() +
(String) name_colored.value +
(String) name_color.value +
"&#ffffff" +
Dominion.config.getGroupTitleSuffix();
return ColorParser.getBukkitType(with_pre_suf);
}
public Boolean getAdmin() {
@Override
public @NotNull Boolean getAdmin() {
return (Boolean) admin.value;
}
public Boolean getFlagValue(Flag flag) {
@Override
public @NotNull Boolean getFlagValue(@NotNull Flag flag) {
if (!flags.containsKey(flag)) return flag.getDefaultValue();
return flags.get(flag);
}
public GroupDTO setName(String name) {
this.name_colored.value = name;
this.name.value = ColorParser.getPlainText(name);
UpdateRow updateRow = new UpdateRow().field(this.name).field(this.name_colored);
@Override
public @NotNull Map<Flag, Boolean> getFlagsValue() {
return flags;
}
@Override
public @Nullable GroupDTO setName(@NotNull String name) {
this.name_color.value = name;
this.name_raw.value = ColorParser.getPlainText(name);
UpdateRow updateRow = new UpdateRow().field(this.name_raw).field(this.name_color);
return doUpdate(updateRow);
}
public GroupDTO setAdmin(Boolean admin) {
@Override
public @Nullable GroupDTO setAdmin(@NotNull Boolean admin) {
this.admin.value = admin;
UpdateRow updateRow = new UpdateRow().field(this.admin);
return doUpdate(updateRow);
}
public GroupDTO setFlagValue(Flag flag, Boolean value) {
@Override
public GroupDTO setFlagValue(@NotNull Flag flag, @NotNull Boolean value) {
if (flag.isEnvironmentFlag()) {
return null;
}
flags.put(flag, value);
Field f = new Field(flag.getFlagName(), value);
UpdateRow updateRow = new UpdateRow().field(f);
@ -90,17 +116,17 @@ public class GroupDTO {
InsertRow insertRow = new InsertRow().returningAll().onConflictDoNothing(new Field("id", null));
insertRow.table("dominion_group")
.field(group.domID)
.field(group.name)
.field(group.name_raw)
.field(group.admin)
.field(group.name_colored);
for (Flag f : Flag.getPrivilegeFlagsEnabled()) {
.field(group.name_color);
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getPrivilegeFlagsEnabled()) {
insertRow.field(new Field(f.getFlagName(), dominionDTO.getFlagValue(f)));
}
try (ResultSet rs = insertRow.execute()) {
List<GroupDTO> groups = getDTOFromRS(rs);
if (groups.isEmpty()) return null;
Cache.instance.loadGroups(groups.getFirst().getId());
return groups.getFirst();
Cache.instance.loadGroups(groups.get(0).getId());
return groups.get(0);
} catch (Exception e) {
DatabaseManager.handleDatabaseError("GroupDTO.create ", e, "");
return null;
@ -125,14 +151,14 @@ public class GroupDTO {
String sql = "SELECT * FROM dominion_group WHERE id = ?;";
List<GroupDTO> groups = getDTOFromRS(DatabaseManager.instance.query(sql, id));
if (groups.isEmpty()) return null;
return groups.getFirst();
return groups.get(0);
}
public static GroupDTO select(Integer domID, String name) {
String sql = "SELECT * FROM dominion_group WHERE dom_id = ? AND name = ?;";
List<GroupDTO> groups = getDTOFromRS(DatabaseManager.instance.query(sql, domID, name));
if (groups.isEmpty()) return null;
return groups.getFirst();
return groups.get(0);
}
public static List<GroupDTO> selectAll() {
@ -147,10 +173,10 @@ public class GroupDTO {
private GroupDTO(String name, Integer domID) {
this.domID.value = domID;
this.name.value = ColorParser.getPlainText(name);
this.name_colored.value = name;
this.name_raw.value = ColorParser.getPlainText(name);
this.name_color.value = name;
this.admin.value = false;
for (Flag f : Flag.getPrivilegeFlagsEnabled()) {
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getPrivilegeFlagsEnabled()) {
flags.put(f, f.getDefaultValue());
}
}
@ -158,10 +184,10 @@ public class GroupDTO {
private GroupDTO(Integer id, Integer domID, String name, Boolean admin, Map<Flag, Boolean> flags, String nameColored) {
this.id.value = id;
this.domID.value = domID;
this.name.value = name;
this.name_raw.value = name;
this.admin.value = admin;
this.flags.putAll(flags);
this.name_colored.value = nameColored;
this.name_color.value = nameColored;
}
private static List<GroupDTO> getDTOFromRS(ResultSet rs) {
@ -170,7 +196,7 @@ public class GroupDTO {
try {
while (rs.next()) {
Map<Flag, Boolean> flags = new HashMap<>();
for (Flag f : Flag.getPrivilegeFlagsEnabled()) {
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getPrivilegeFlagsEnabled()) {
flags.put(f, rs.getBoolean(f.getFlagName()));
}
GroupDTO group = new GroupDTO(
@ -197,7 +223,7 @@ public class GroupDTO {
List<GroupDTO> groups = getDTOFromRS(rs);
if (groups.isEmpty()) return null;
Cache.instance.loadGroups((Integer) id.value);
return groups.getFirst();
return groups.get(0);
} catch (Exception e) {
DatabaseManager.handleDatabaseError("更新权限组失败: ", e, "");
return null;

View File

@ -1,16 +1,19 @@
package cn.lunadeer.dominion.dtos;
import cn.lunadeer.dominion.Cache;
import cn.lunadeer.dominion.api.dtos.Flag;
import cn.lunadeer.minecraftpluginutils.databse.DatabaseManager;
import cn.lunadeer.minecraftpluginutils.databse.Field;
import cn.lunadeer.minecraftpluginutils.databse.FieldType;
import cn.lunadeer.minecraftpluginutils.databse.syntax.InsertRow;
import cn.lunadeer.minecraftpluginutils.databse.syntax.UpdateRow;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.sql.ResultSet;
import java.util.*;
public class MemberDTO {
public class MemberDTO implements cn.lunadeer.dominion.api.dtos.MemberDTO {
private static List<MemberDTO> query(String sql, Object... params) {
List<MemberDTO> players = new ArrayList<>();
@ -28,7 +31,7 @@ public class MemberDTO {
try {
while (rs.next()) {
Map<Flag, Boolean> flags = new HashMap<>();
for (Flag f : Flag.getPrivilegeFlagsEnabled()) {
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getPrivilegeFlagsEnabled()) {
flags.put(f, rs.getBoolean(f.getFlagName()));
}
MemberDTO player = new MemberDTO(
@ -55,7 +58,7 @@ public class MemberDTO {
List<MemberDTO> players = getDTOFromRS(rs);
if (players.isEmpty()) return null;
Cache.instance.loadMembers(getPlayerUUID());
return players.getFirst();
return players.get(0);
} catch (Exception e) {
DatabaseManager.handleDatabaseError("MemberDTO.doUpdate ", e, "");
return null;
@ -68,14 +71,14 @@ public class MemberDTO {
.field(player.playerUUID)
.field(player.admin)
.field(player.domID);
for (Flag f : Flag.getPrivilegeFlagsEnabled()) {
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getPrivilegeFlagsEnabled()) {
insertRow.field(new Field(f.getFlagName(), player.getFlagValue(f)));
}
try (ResultSet rs = insertRow.execute()) {
Cache.instance.loadMembers(player.getPlayerUUID());
List<MemberDTO> players = getDTOFromRS(rs);
if (players.isEmpty()) return null;
return players.getFirst();
return players.get(0);
} catch (Exception e) {
DatabaseManager.handleDatabaseError("MemberDTO.insert ", e, "");
return null;
@ -86,7 +89,7 @@ public class MemberDTO {
String sql = "SELECT * FROM dominion_member WHERE player_uuid = ? AND dom_id = ?;";
List<MemberDTO> p = query(sql, playerUUID.toString(), dom_id);
if (p.isEmpty()) return null;
return p.getFirst();
return p.get(0);
}
public static List<MemberDTO> select(Integer dom_id) {
@ -126,41 +129,57 @@ public class MemberDTO {
Field domID = new Field("dom_id", FieldType.INT);
Field groupId = new Field("group_id", FieldType.INT);
@Override
public Integer getId() {
return (Integer) id.value;
}
@Override
public UUID getPlayerUUID() {
return UUID.fromString((String) playerUUID.value);
}
@Override
public Boolean getAdmin() {
return (Boolean) admin.value;
}
@Override
public Integer getDomID() {
return (Integer) domID.value;
}
@Override
public Integer getGroupId() {
return (Integer) groupId.value;
}
private final Map<Flag, Boolean> flags = new HashMap<>();
public Boolean getFlagValue(Flag flag) {
@Override
public @NotNull Boolean getFlagValue(Flag flag) {
if (!flags.containsKey(flag)) return flag.getDefaultValue();
return flags.get(flag);
}
public MemberDTO setFlagValue(Flag flag, Boolean value) {
@Override
public @NotNull Map<Flag, Boolean> getFlagsValue() {
return flags;
}
@Override
public MemberDTO setFlagValue(@NotNull Flag flag, @NotNull Boolean value) {
if (flag.isEnvironmentFlag()) {
return null;
}
flags.put(flag, value);
Field f = new Field(flag.getFlagName(), value);
UpdateRow updateRow = new UpdateRow().field(f);
return doUpdate(updateRow);
}
public MemberDTO setAdmin(Boolean admin) {
@Override
public @Nullable MemberDTO setAdmin(@NotNull Boolean admin) {
this.admin.value = admin;
UpdateRow updateRow = new UpdateRow().field(this.admin);
return doUpdate(updateRow);
@ -175,7 +194,7 @@ public class MemberDTO {
public MemberDTO applyTemplate(PrivilegeTemplateDTO template) {
this.admin.value = template.getAdmin();
UpdateRow updateRow = new UpdateRow().field(admin);
for (Flag f : Flag.getPrivilegeFlagsEnabled()) {
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getPrivilegeFlagsEnabled()) {
this.flags.put(f, template.getFlagValue(f));
updateRow.field(new Field(f.getFlagName(), template.getFlagValue(f)));
}
@ -196,9 +215,7 @@ public class MemberDTO {
this.playerUUID.value = playerUUID.toString();
this.admin.value = false;
this.domID.value = dom.getId();
for (Flag f : Flag.getPrivilegeFlagsEnabled()) {
this.flags.put(f, dom.getFlagValue(f));
}
this.flags.putAll(dom.getGuestPrivilegeFlagValue());
}
}

View File

@ -77,14 +77,14 @@ public class PlayerDTO {
String sql = "SELECT * FROM player_name WHERE uuid = ?;";
List<PlayerDTO> players = query(sql, uuid.toString());
if (players.isEmpty()) return null;
return players.getFirst();
return players.get(0);
}
public static PlayerDTO select(String name) {
String sql = "SELECT * FROM player_name WHERE last_known_name = ?;";
List<PlayerDTO> players = query(sql, name);
if (players.isEmpty()) return null;
return players.getFirst();
return players.get(0);
}
public static List<PlayerDTO> search(String name) {
@ -114,7 +114,7 @@ public class PlayerDTO {
try (ResultSet rs = insertRow.execute()) {
List<PlayerDTO> players = getDTOFromRS(rs);
if (players.isEmpty()) return null;
return players.getFirst();
return players.get(0);
} catch (SQLException e) {
DatabaseManager.handleDatabaseError("PlayerDTO.insert ", e, insertRow.toString());
return null;
@ -136,7 +136,7 @@ public class PlayerDTO {
try (ResultSet rs = updateRow.execute()) {
List<PlayerDTO> players = getDTOFromRS(rs);
if (players.isEmpty()) return null;
return players.getFirst();
return players.get(0);
} catch (SQLException e) {
DatabaseManager.handleDatabaseError("PlayerDTO.update ", e, updateRow.toString());
return null;

View File

@ -1,5 +1,6 @@
package cn.lunadeer.dominion.dtos;
import cn.lunadeer.dominion.api.dtos.Flag;
import cn.lunadeer.minecraftpluginutils.databse.DatabaseManager;
import cn.lunadeer.minecraftpluginutils.databse.Field;
import cn.lunadeer.minecraftpluginutils.databse.syntax.InsertRow;
@ -26,7 +27,7 @@ public class PrivilegeTemplateDTO {
try {
while (rs.next()) {
Map<Flag, Boolean> flags = new HashMap<>();
for (Flag f : Flag.getPrivilegeFlagsEnabled()) {
for (Flag f : cn.lunadeer.dominion.dtos.Flag.getPrivilegeFlagsEnabled()) {
flags.put(f, rs.getBoolean(f.getFlagName()));
}
PrivilegeTemplateDTO template = new PrivilegeTemplateDTO(
@ -54,7 +55,7 @@ public class PrivilegeTemplateDTO {
try (ResultSet rs = insertRow.execute()) {
List<PrivilegeTemplateDTO> templates = getDTOFromRS(rs);
if (templates.isEmpty()) return null;
return templates.getFirst();
return templates.get(0);
} catch (Exception e) {
DatabaseManager.handleDatabaseError("PrivilegeTemplateDTO.create ", e, null);
return null;
@ -69,7 +70,7 @@ public class PrivilegeTemplateDTO {
try (ResultSet rs = updateRow.execute()) {
List<PrivilegeTemplateDTO> templates = getDTOFromRS(rs);
if (templates.isEmpty()) return null;
return templates.getFirst();
return templates.get(0);
} catch (Exception e) {
DatabaseManager.handleDatabaseError("PrivilegeTemplateDTO.doUpdate ", e, null);
return null;
@ -80,7 +81,7 @@ public class PrivilegeTemplateDTO {
String sql = "SELECT * FROM privilege_template WHERE creator = ? AND name = ?;";
List<PrivilegeTemplateDTO> templates = query(sql, creator.toString(), name);
if (templates.isEmpty()) return null;
return templates.getFirst();
return templates.get(0);
}
public static List<PrivilegeTemplateDTO> selectAll(UUID creator) {

View File

@ -2,6 +2,7 @@ package cn.lunadeer.dominion.managers;
import cn.lunadeer.dominion.Dominion;
import cn.lunadeer.dominion.dtos.Flag;
import cn.lunadeer.dominion.utils.MessageDisplay;
import cn.lunadeer.minecraftpluginutils.VaultConnect.VaultConnect;
import cn.lunadeer.minecraftpluginutils.XLogger;
import org.bukkit.Material;
@ -11,10 +12,7 @@ import org.bukkit.entity.Player;
import javax.annotation.Nullable;
import java.io.File;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
public class ConfigManager {
public static ConfigManager instance;
@ -41,7 +39,14 @@ public class ConfigManager {
_db_name = _file.getString("Database.Name", "dominion");
_db_user = _file.getString("Database.User", "postgres");
_db_pass = _file.getString("Database.Pass", "postgres");
_auto_create_radius = _file.getInt("AutoCreateRadius", 10);
_default_join_message = _file.getString("DefaultJoinMessage", "&3{OWNER}: Welcome to {DOM}!");
_default_leave_message = _file.getString("DefaultLeaveMessage", "&3{OWNER}: Leaving {DOM}...");
_message_display_no_permission = _file.getString("MessageDisplay.NoPermission", "ACTION_BAR");
_message_display_join_leave = _file.getString("MessageDisplay.JoinLeave", "ACTION_BAR");
_spawn_protection = _file.getInt("Limit.SpawnProtection", 10);
_blue_map = _file.getBoolean("BlueMap", false);
_dynmap = _file.getBoolean("Dynmap", false);
@ -52,6 +57,7 @@ public class ConfigManager {
_tp_delay = _file.getInt("Teleport.Delay", 0);
_tp_cool_down = _file.getInt("Teleport.CoolDown", 0);
_tool = _file.getString("Tool", "ARROW");
_info_tool = _file.getString("InfoTool", "STRING");
_economy_enable = _file.getBoolean("Economy.Enable", false);
if (getEconomyEnable()) {
@ -64,9 +70,21 @@ public class ConfigManager {
_group_title_suffix = _file.getString("GroupTitle.Suffix", "&#ffffff]");
GroupLimit defaultGroup = new GroupLimit();
defaultGroup.setLimitSizeX(_file.getInt("Limit.SizeX", 128), null);
defaultGroup.setLimitSizeY(_file.getInt("Limit.SizeY", 64), null);
defaultGroup.setLimitSizeZ(_file.getInt("Limit.SizeZ", 128), null);
if (_file.contains("Limit.SizeX")) { // todo: should be removed in the future
defaultGroup.setLimitSizeMaxX(_file.getInt("Limit.SizeX", 128), null);
defaultGroup.setLimitSizeMaxY(_file.getInt("Limit.SizeY", 64), null);
defaultGroup.setLimitSizeMaxZ(_file.getInt("Limit.SizeZ", 128), null);
defaultGroup.setLimitSizeMinX(4, null);
defaultGroup.setLimitSizeMinY(4, null);
defaultGroup.setLimitSizeMinZ(4, null);
} else {
defaultGroup.setLimitSizeMaxX(_file.getInt("Limit.Size.MaxX", 128), null);
defaultGroup.setLimitSizeMaxY(_file.getInt("Limit.Size.MaxY", 64), null);
defaultGroup.setLimitSizeMaxZ(_file.getInt("Limit.Size.MaxZ", 128), null);
defaultGroup.setLimitSizeMinX(_file.getInt("Limit.Size.MinX", 4), null);
defaultGroup.setLimitSizeMinY(_file.getInt("Limit.Size.MinY", 4), null);
defaultGroup.setLimitSizeMinZ(_file.getInt("Limit.Size.MinZ", 4), null);
}
defaultGroup.setLimitMinY(_file.getInt("Limit.MinY", -64), null);
defaultGroup.setLimitMaxY(_file.getInt("Limit.MaxY", 320), null);
defaultGroup.setLimitAmount(_file.getInt("Limit.Amount", 10), null);
@ -110,6 +128,16 @@ public class ConfigManager {
_file.set("AutoCreateRadius", _auto_create_radius);
_file.setComments("AutoCreateRadius", Arrays.asList(Translation.Config_Comment_AutoCreateRadius.trans(), Translation.Config_Comment_NegativeOneDisabled.trans()));
_file.set("DefaultJoinMessage", _default_join_message);
_file.setComments("DefaultJoinMessage", Collections.singletonList(Translation.Config_Comment_DefaultJoinMessage.trans()));
_file.set("DefaultLeaveMessage", _default_leave_message);
_file.setComments("DefaultLeaveMessage", Collections.singletonList(Translation.Config_Comment_DefaultLeaveMessage.trans()));
_file.setComments("MessageDisplay", Collections.singletonList(Translation.Config_Comment_MessageDisplay.trans()));
_file.set("MessageDisplay.NoPermission", _message_display_no_permission);
_file.setComments("MessageDisplay.NoPermission", Collections.singletonList(Translation.Config_Comment_MessageDisplayNoPermission.trans()));
_file.set("MessageDisplay.JoinLeave", _message_display_join_leave);
_file.setComments("MessageDisplay.JoinLeave", Collections.singletonList(Translation.Config_Comment_MessageDisplayJoinLeave.trans()));
_file.setComments("Limit", List.of(Translation.Config_Comment_DefaultLimit.trans()));
_file.set("Limit.SpawnProtection", _spawn_protection);
@ -118,12 +146,18 @@ public class ConfigManager {
_file.setInlineComments("Limit.MinY", List.of(Translation.Config_Comment_MinY.trans()));
_file.set("Limit.MaxY", groupLimits.get("default").getLimitMaxY(null));
_file.setInlineComments("Limit.MaxY", List.of(Translation.Config_Comment_MaxY.trans()));
_file.set("Limit.SizeX", groupLimits.get("default").getLimitSizeX(null));
_file.setInlineComments("Limit.SizeX", List.of(Translation.Config_Comment_SizeX.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
_file.set("Limit.SizeY", groupLimits.get("default").getLimitSizeY(null));
_file.setInlineComments("Limit.SizeY", List.of(Translation.Config_Comment_SizeY.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
_file.set("Limit.SizeZ", groupLimits.get("default").getLimitSizeZ(null));
_file.setInlineComments("Limit.SizeZ", List.of(Translation.Config_Comment_SizeZ.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
_file.set("Limit.Size.MaxX", groupLimits.get("default").getLimitSizeMaxX(null));
_file.setInlineComments("Limit.Size.MaxX", List.of(Translation.Config_Comment_SizeMaxX.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
_file.set("Limit.Size.MaxY", groupLimits.get("default").getLimitSizeMaxY(null));
_file.setInlineComments("Limit.Size.MaxY", List.of(Translation.Config_Comment_SizeMaxY.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
_file.set("Limit.Size.MaxZ", groupLimits.get("default").getLimitSizeMaxZ(null));
_file.setInlineComments("Limit.Size.MaxZ", List.of(Translation.Config_Comment_SizeMaxZ.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
_file.set("Limit.Size.MinX", groupLimits.get("default").getLimitSizeMinX(null));
_file.setInlineComments("Limit.Size.MinX", List.of(Translation.Config_Comment_SizeMinX.trans()));
_file.set("Limit.Size.MinY", groupLimits.get("default").getLimitSizeMinY(null));
_file.setInlineComments("Limit.Size.MinY", List.of(Translation.Config_Comment_SizeMinY.trans()));
_file.set("Limit.Size.MinZ", groupLimits.get("default").getLimitSizeMinZ(null));
_file.setInlineComments("Limit.Size.MinZ", List.of(Translation.Config_Comment_SizeMinZ.trans()));
_file.set("Limit.Amount", groupLimits.get("default").getLimitAmount(null));
_file.setInlineComments("Limit.Amount", List.of(Translation.Config_Comment_Amount.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
_file.set("Limit.Depth", groupLimits.get("default").getLimitDepth(null));
@ -146,6 +180,8 @@ public class ConfigManager {
_file.set("Tool", _tool);
_file.setComments("Tool", List.of(Translation.Config_Comment_ToolName.trans()));
_file.set("InfoTool", _info_tool);
_file.setComments("InfoTool", List.of(Translation.Config_Comment_InfoToolName.trans()));
_file.setComments("Economy", Arrays.asList(Translation.Config_Comment_Economy.trans(), Translation.Config_Comment_VaultRequired.trans()));
_file.set("Economy.Enable", _economy_enable);
@ -234,22 +270,42 @@ public class ConfigManager {
return _db_pass;
}
public Integer getLimitSizeX(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeX(player.getWorld());
public Integer getLimitSizeMaxX(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeMaxX(player.getWorld());
}
public Integer getLimitSizeY(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeY(player.getWorld());
public Integer getLimitSizeMaxY(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeMaxY(player.getWorld());
}
public Integer getLimitSizeZ(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeZ(player.getWorld());
public Integer getLimitSizeMaxZ(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeMaxZ(player.getWorld());
}
public Integer getLimitSizeMinX(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeMinX(player.getWorld());
}
public Integer getLimitSizeMinY(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeMinY(player.getWorld());
}
public Integer getLimitSizeMinZ(Player player) {
return groupLimits.get(getPlayerGroup(player)).getLimitSizeMinZ(player.getWorld());
}
public Integer getAutoCreateRadius() {
return _auto_create_radius;
}
public String getDefaultJoinMessage() {
return _default_join_message;
}
public String getDefaultLeaveMessage() {
return _default_leave_message;
}
public void setAutoCreateRadius(Integer radius) {
_auto_create_radius = radius;
_file.set("AutoCreateRadius", radius);
@ -267,6 +323,14 @@ public class ConfigManager {
return _auto_clean_after_days;
}
public MessageDisplay.Place getMessageDisplayNoPermission() {
return MessageDisplay.Place.valueOf(_message_display_no_permission);
}
public MessageDisplay.Place getMessageDisplayJoinLeave() {
return MessageDisplay.Place.valueOf(_message_display_join_leave);
}
public void setAutoCleanAfterDays(Integer auto_clean_after_days) {
_auto_clean_after_days = auto_clean_after_days;
_file.set("AutoCleanAfterDays", auto_clean_after_days);
@ -335,6 +399,15 @@ public class ConfigManager {
_file.set("Tool", tool);
}
public Material getInfoTool() {
return Material.getMaterial(_info_tool);
}
public void setInfoTool(String info_tool) {
_info_tool = info_tool;
_file.set("InfoTool", info_tool);
}
public Boolean getEconomyEnable() {
return _economy_enable;
}
@ -389,14 +462,26 @@ public class ConfigManager {
XLogger.err(Translation.Config_Check_ToolNameError);
setTool("ARROW");
}
if (getAutoCreateRadius() == 0) {
if (Material.getMaterial(_info_tool) == null) {
XLogger.err(Translation.Config_Check_InfoToolNameError);
setInfoTool("STRING");
}
if (getAutoCreateRadius() <= 0 && getAutoCreateRadius() != -1) {
XLogger.err(Translation.Config_Check_AutoCreateRadiusError);
setAutoCreateRadius(10);
}
if (getAutoCleanAfterDays() == 0) {
if (getAutoCleanAfterDays() <= 0 && getAutoCleanAfterDays() != -1) {
XLogger.err(Translation.Config_Check_AutoCleanAfterDaysError);
setAutoCleanAfterDays(180);
}
if (Arrays.stream(MessageDisplay.Place.values()).noneMatch(place -> place.name().equals(getMessageDisplayNoPermission().name()))) {
XLogger.err(Translation.Config_Check_MessageDisplayError, getMessageDisplayNoPermission());
_message_display_no_permission = "ACTION_BAR";
}
if (Arrays.stream(MessageDisplay.Place.values()).noneMatch(place -> place.name().equals(getMessageDisplayJoinLeave().name()))) {
XLogger.err(Translation.Config_Check_MessageDisplayError, getMessageDisplayJoinLeave());
_message_display_join_leave = "ACTION_BAR";
}
if (getTpDelay() < 0) {
XLogger.err(Translation.Config_Check_TpDelayError);
setTpDelay(0);
@ -426,6 +511,8 @@ public class ConfigManager {
private String _language;
private Integer _auto_create_radius;
private String _default_join_message;
private String _default_leave_message;
private Boolean _limit_op_bypass;
@ -438,7 +525,9 @@ public class ConfigManager {
private Boolean _tp_enable;
private Integer _tp_delay;
private Integer _tp_cool_down;
private String _tool;
private String _info_tool;
private Boolean _economy_enable;
@ -450,6 +539,9 @@ public class ConfigManager {
private String _group_title_prefix;
private String _group_title_suffix;
private String _message_display_no_permission;
private String _message_display_join_leave;
private final Map<String, GroupLimit> groupLimits = new HashMap<>();
private String getPlayerGroup(@Nullable Player player) {

View File

@ -1,16 +1,27 @@
package cn.lunadeer.dominion.managers;
import cn.lunadeer.dominion.Dominion;
import cn.lunadeer.dominion.commands.Operator;
import cn.lunadeer.dominion.dtos.Flag;
import cn.lunadeer.minecraftpluginutils.Notification;
import cn.lunadeer.minecraftpluginutils.Scheduler;
import cn.lunadeer.minecraftpluginutils.XLogger;
import cn.lunadeer.minecraftpluginutils.databse.*;
import cn.lunadeer.minecraftpluginutils.databse.syntax.AddColumn;
import cn.lunadeer.minecraftpluginutils.databse.syntax.CreateTable;
import cn.lunadeer.minecraftpluginutils.databse.syntax.InsertRow;
import cn.lunadeer.minecraftpluginutils.databse.syntax.RemoveColumn;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DatabaseTables {
public static void migrate() {
@ -114,8 +125,8 @@ public class DatabaseTables {
Field server_dom_y2_field = new Field("y2", 2147483647);
Field server_dom_z2_field = new Field("z2", 2147483647);
Field server_dom_parent_dom_id_field = new Field("parent_dom_id", -1);
Field server_dom_join_message_field = new Field("join_message", "欢迎");
Field server_dom_leave_message_field = new Field("leave_message", "再见");
Field server_dom_join_message_field = new Field("join_message", "");
Field server_dom_leave_message_field = new Field("leave_message", "");
InsertRow insert_server_dom = new InsertRow().table("dominion").onConflictDoNothing(server_dom_id_field)
.field(server_dom_id_field)
.field(server_dom_owner_field)
@ -260,4 +271,79 @@ public class DatabaseTables {
new RemoveColumn("world").table("dominion").IfExists().execute();
}
}
private static final File export_path = new File(Dominion.instance.getDataFolder(), "ExportedDatabaseTables");
public static void Export(CommandSender sender) {
Scheduler.runTaskAsync(() -> {
Notification.info(sender, Translation.Commands_Operator_ExportDBBegin);
if (!export_path.exists()) {
export_path.mkdirs();
}
Common.ExportCSV("player_name", new File(export_path, "player_name.csv"));
Common.ExportCSV("privilege_template", new File(export_path, "privilege_template.csv"));
Common.ExportCSV("dominion", new File(export_path, "dominion.csv"));
Common.ExportCSV("dominion_group", new File(export_path, "dominion_group.csv"));
Common.ExportCSV("dominion_member", new File(export_path, "dominion_member.csv"));
Map<String, String> world_uid_map = Dominion.instance.getServer().getWorlds().stream().collect(HashMap::new, (m, w) -> m.put(w.getName(), w.getUID().toString()), HashMap::putAll);
YamlConfiguration world_uid = new YamlConfiguration();
for (Map.Entry<String, String> entry : world_uid_map.entrySet()) {
world_uid.set(entry.getKey(), entry.getValue());
}
try {
world_uid.save(new File(export_path, "world_uid_mapping.yml"));
} catch (Exception e) {
XLogger.err("Save world_uid_mapping.yml failed: %s", e.getMessage());
return;
}
Notification.info(sender, Translation.Commands_Operator_ExportDBSuccess);
Notification.info(sender, "Path: %s", export_path.getAbsolutePath());
});
}
public static void Import(CommandSender sender) {
Scheduler.runTaskAsync(() -> {
if (!export_path.exists()) {
Notification.error(sender, Translation.Commands_Operator_ImportDBFail);
return;
}
Notification.info(sender, Translation.Commands_Operator_ImportDBBegin);
Map<String, String> world_uid_map = Dominion.instance.getServer().getWorlds().stream().collect(HashMap::new, (m, w) -> m.put(w.getName(), w.getUID().toString()), HashMap::putAll);
File player_name_csv = new File(export_path, "player_name.csv");
File privilege_template_csv = new File(export_path, "privilege_template.csv");
File dominion_csv = new File(export_path, "dominion.csv");
File world_uid_mapping = new File(export_path, "world_uid_mapping.yml");
File dominion_group_csv = new File(export_path, "dominion_group.csv");
File dominion_member_csv = new File(export_path, "dominion_member.csv");
if (!player_name_csv.exists() || !privilege_template_csv.exists() || !dominion_csv.exists() || !world_uid_mapping.exists() || !dominion_group_csv.exists() || !dominion_member_csv.exists()) {
Notification.error(sender, Translation.Commands_Operator_ImportDBIncompleteFail);
return;
}
try {
String dominion_file_str = Files.readString(dominion_csv.toPath());
YamlConfiguration world_uid = YamlConfiguration.loadConfiguration(world_uid_mapping);
for (String key : world_uid.getKeys(false)) {
if (world_uid_map.containsKey(key)) {
String old_uid = world_uid.getString(key);
String new_uid = world_uid_map.get(key);
if (old_uid == null || new_uid == null) {
continue;
}
dominion_file_str = dominion_file_str.replace(old_uid, world_uid_map.get(key));
}
}
Files.writeString(dominion_csv.toPath(), dominion_file_str);
} catch (IOException e) {
XLogger.err("Import world_uid_mapping.yml failed: %s", e.getMessage());
return;
}
Common.ImportCSV("player_name", "id", player_name_csv);
Common.ImportCSV("privilege_template", "id", privilege_template_csv);
Common.ImportCSV("dominion", "id", dominion_csv);
Common.ImportCSV("dominion_group", "id", dominion_group_csv);
Common.ImportCSV("dominion_member", "id", dominion_member_csv);
Notification.info(sender, Translation.Commands_Operator_ImportDBSuccess);
Operator.reloadCache(sender, new String[0]);
});
}
}

View File

@ -1,5 +1,6 @@
package cn.lunadeer.dominion.managers;
import cn.lunadeer.dominion.Dominion;
import cn.lunadeer.minecraftpluginutils.XLogger;
import org.bukkit.World;
import org.bukkit.configuration.ConfigurationSection;
@ -33,9 +34,21 @@ public class GroupLimit {
WorldSetting defaultSetting = new WorldSetting(filePath.getName());
defaultSetting.min_y = config.getInt("MinY", -64);
defaultSetting.max_y = config.getInt("MaxY", 320);
defaultSetting.size_x = config.getInt("SizeX", 128);
defaultSetting.size_y = config.getInt("SizeY", 64);
defaultSetting.size_z = config.getInt("SizeZ", 128);
if (config.contains("SizeX")) { // todo: should be removed in the future
defaultSetting.size_max_x = config.getInt("SizeX", 128);
defaultSetting.size_max_y = config.getInt("SizeY", 64);
defaultSetting.size_max_z = config.getInt("SizeZ", 128);
defaultSetting.size_min_x = 4;
defaultSetting.size_min_y = 4;
defaultSetting.size_min_z = 4;
} else {
defaultSetting.size_max_x = config.getInt("Size.MaxX", 128);
defaultSetting.size_max_y = config.getInt("Size.MaxY", 64);
defaultSetting.size_max_z = config.getInt("Size.MaxZ", 128);
defaultSetting.size_min_x = config.getInt("Size.MinX", 4);
defaultSetting.size_min_y = config.getInt("Size.MinY", 4);
defaultSetting.size_min_z = config.getInt("Size.MinZ", 4);
}
defaultSetting.amount = config.getInt("Amount", 10);
defaultSetting.depth = config.getInt("Depth", 3);
defaultSetting.vert = config.getBoolean("Vert", false);
@ -67,27 +80,51 @@ public class GroupLimit {
}
}
public Integer getLimitSizeX(@Nullable World world) {
public Integer getLimitSizeMaxX(@Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
return world_limits.get("default").size_x;
return world_limits.get("default").size_max_x;
} else {
return world_limits.get(world.getName()).size_x;
return world_limits.get(world.getName()).size_max_x;
}
}
public Integer getLimitSizeY(@Nullable World world) {
public Integer getLimitSizeMaxY(@Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
return world_limits.get("default").size_y;
return world_limits.get("default").size_max_y;
} else {
return world_limits.get(world.getName()).size_y;
return world_limits.get(world.getName()).size_max_y;
}
}
public Integer getLimitSizeZ(@Nullable World world) {
public Integer getLimitSizeMaxZ(@Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
return world_limits.get("default").size_z;
return world_limits.get("default").size_max_z;
} else {
return world_limits.get(world.getName()).size_z;
return world_limits.get(world.getName()).size_max_z;
}
}
public Integer getLimitSizeMinX(@Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
return world_limits.get("default").size_min_x;
} else {
return world_limits.get(world.getName()).size_min_x;
}
}
public Integer getLimitSizeMinY(@Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
return world_limits.get("default").size_min_y;
} else {
return world_limits.get(world.getName()).size_min_y;
}
}
public Integer getLimitSizeMinZ(@Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
return world_limits.get("default").size_min_z;
} else {
return world_limits.get(world.getName()).size_min_z;
}
}
@ -144,27 +181,51 @@ public class GroupLimit {
}
}
public void setLimitSizeX(Integer size_x, @Nullable World world) {
public void setLimitSizeMaxX(Integer size_x, @Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
world_limits.get("default").size_x = size_x;
world_limits.get("default").size_max_x = size_x;
} else {
world_limits.get(world.getName()).size_x = size_x;
world_limits.get(world.getName()).size_max_x = size_x;
}
}
public void setLimitSizeY(Integer size_y, @Nullable World world) {
public void setLimitSizeMaxY(Integer size_y, @Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
world_limits.get("default").size_y = size_y;
world_limits.get("default").size_max_y = size_y;
} else {
world_limits.get(world.getName()).size_y = size_y;
world_limits.get(world.getName()).size_max_y = size_y;
}
}
public void setLimitSizeZ(Integer size_z, @Nullable World world) {
public void setLimitSizeMaxZ(Integer size_z, @Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
world_limits.get("default").size_z = size_z;
world_limits.get("default").size_max_z = size_z;
} else {
world_limits.get(world.getName()).size_z = size_z;
world_limits.get(world.getName()).size_max_z = size_z;
}
}
public void setLimitSizeMinX(Integer size_x, @Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
world_limits.get("default").size_min_x = size_x;
} else {
world_limits.get(world.getName()).size_min_x = size_x;
}
}
public void setLimitSizeMinY(Integer size_y, @Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
world_limits.get("default").size_min_y = size_y;
} else {
world_limits.get(world.getName()).size_min_y = size_y;
}
}
public void setLimitSizeMinZ(Integer size_z, @Nullable World world) {
if (world == null || !world_limits.containsKey(world.getName())) {
world_limits.get("default").size_min_z = size_z;
} else {
world_limits.get(world.getName()).size_min_z = size_z;
}
}
@ -250,12 +311,18 @@ public class GroupLimit {
this.config.setInlineComments("MinY", List.of(Translation.Config_Comment_MinY.trans()));
this.config.set("MaxY", world_limits.get("default").max_y);
this.config.setInlineComments("MaxY", List.of(Translation.Config_Comment_MaxY.trans()));
this.config.set("SizeX", world_limits.get("default").size_x);
this.config.setInlineComments("SizeX", List.of(Translation.Config_Comment_SizeX.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
this.config.set("SizeY", world_limits.get("default").size_y);
this.config.setInlineComments("SizeY", List.of(Translation.Config_Comment_SizeY.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
this.config.set("SizeZ", world_limits.get("default").size_z);
this.config.setInlineComments("SizeZ", List.of(Translation.Config_Comment_SizeZ.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
this.config.set("Size.MaxX", world_limits.get("default").size_max_x);
this.config.setInlineComments("Size.MaxX", List.of(Translation.Config_Comment_SizeMaxX.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
this.config.set("Size.MaxY", world_limits.get("default").size_max_y);
this.config.setInlineComments("Size.MaxY", List.of(Translation.Config_Comment_SizeMaxY.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
this.config.set("Size.MaxZ", world_limits.get("default").size_max_z);
this.config.setInlineComments("Size.MaxZ", List.of(Translation.Config_Comment_SizeMaxZ.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
this.config.set("Size.MinX", world_limits.get("default").size_min_x);
this.config.setInlineComments("Size.MinX", List.of(Translation.Config_Comment_SizeMinX.trans()));
this.config.set("Size.MinY", world_limits.get("default").size_min_y);
this.config.setInlineComments("Size.MinY", List.of(Translation.Config_Comment_SizeMinY.trans()));
this.config.set("Size.MinZ", world_limits.get("default").size_min_z);
this.config.setInlineComments("Size.MinZ", List.of(Translation.Config_Comment_SizeMinZ.trans()));
this.config.set("Amount", world_limits.get("default").amount);
this.config.setInlineComments("Amount", List.of(Translation.Config_Comment_Amount.trans() + Translation.Config_Comment_NegativeOneUnlimited.trans()));
this.config.set("Depth", world_limits.get("default").depth);
@ -309,9 +376,17 @@ public class GroupLimit {
public List<String> getWorldBlackList() {
List<String> list = new ArrayList<>();
if (world_limits.getOrDefault("default", new WorldSetting("default")).amount == 0) {
list.addAll(Dominion.instance.getServer().getWorlds().stream().map(World::getName).toList());
}
for (Map.Entry<String, WorldSetting> entry : world_limits.entrySet()) {
if (!entry.getValue().allow) {
if (entry.getKey().equals("default")) {
continue;
}
if (entry.getValue().amount == 0) {
list.add(entry.getKey());
} else {
list.remove(entry.getKey());
}
}
return list;

View File

@ -1,6 +1,7 @@
package cn.lunadeer.dominion.managers;
import cn.lunadeer.dominion.Cache;
import cn.lunadeer.dominion.dtos.DominionDTO;
import cn.lunadeer.dominion.dtos.GroupDTO;
import cn.lunadeer.minecraftpluginutils.XLogger;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
@ -30,6 +31,13 @@ public class PlaceHolderApi extends PlaceholderExpansion {
}
return group.getNameColoredBukkit();
}
if (params.equalsIgnoreCase("current_dominion")) {
DominionDTO dominion = Cache.instance.getDominionByLoc(bukkitPlayer.getLocation());
if (dominion == null) {
return "";
}
return dominion.getName();
}
return null; //
}

View File

@ -148,31 +148,22 @@ public class Translation extends Localization {
public static i18n Commands_Operator_ReloadingConfig;
@i18nField(defaultValue = "配置文件已重新加载")
public static i18n Commands_Operator_ReloadedConfig;
@i18nField(defaultValue = "最高Y坐标限制不能小于最低Y坐标限制")
public static i18n Commands_SetConfig_MinYShouldBeLessThanMaxY;
@i18nField(defaultValue = "最低Y坐标限制不能大于最高Y坐标限制")
public static i18n Commands_SetConfig_MaxYShouldBeGreaterThanMinY;
@i18nField(defaultValue = "X轴(东西)最大尺寸不能小于4")
public static i18n Commands_SetConfig_SizeXShouldBeGreaterThan4;
@i18nField(defaultValue = "Z轴(南北)最大尺寸不能小于4")
public static i18n Commands_SetConfig_SizeZShouldBeGreaterThan4;
@i18nField(defaultValue = "Y轴(垂直)最大尺寸不能小于4")
public static i18n Commands_SetConfig_SizeYShouldBeGreaterThan4;
@i18nField(defaultValue = "每个玩家领地数量限制不能小于0")
public static i18n Commands_SetConfig_AmountShouldBeGreaterThan0;
@i18nField(defaultValue = "领地深度限制不能小于0")
public static i18n Commands_SetConfig_DepthShouldBeGreaterThan0;
@i18nField(defaultValue = "传送延迟不能小于0")
public static i18n Commands_SetConfig_TpDelayShouldBeGreaterThan0;
@i18nField(defaultValue = "传送冷却时间不能小于0")
public static i18n Commands_SetConfig_TpCoolDownShouldBeGreaterThan0;
@i18nField(defaultValue = "每方块单价不能小于0")
public static i18n Commands_SetConfig_PriceShouldBeGreaterThan0;
@i18nField(defaultValue = "领地退款比例不能小于0")
public static i18n Commands_SetConfig_RefundShouldBeGreaterThan0;
@i18nField(defaultValue = "出生点保护半径不能小于或等于0")
public static i18n Commands_SetConfig_SpawnProtectRadiusShouldBeGreaterThan0;
@i18nField(defaultValue = "你正在尝试导出数据库表,此行为会踢出所有玩家并关闭服务器,如确认继续请输入 /dominion export_db confirm")
public static i18n Commands_Operator_ExportDBConfirm;
@i18nField(defaultValue = "正在导出数据库表...")
public static i18n Commands_Operator_ExportDBBegin;
@i18nField(defaultValue = "数据库表导出完成")
public static i18n Commands_Operator_ExportDBSuccess;
@i18nField(defaultValue = "你正在尝试导入数据库表,此行为会踢出所有玩家并关闭服务器,如确认继续请输入 /dominion import_db confirm")
public static i18n Commands_Operator_ImportDBConfirm;
@i18nField(defaultValue = "正在导入数据库表...")
public static i18n Commands_Operator_ImportDBBegin;
@i18nField(defaultValue = "数据库表导入完成")
public static i18n Commands_Operator_ImportDBSuccess;
@i18nField(defaultValue = "没有可导入的数据")
public static i18n Commands_Operator_ImportDBFail;
@i18nField(defaultValue = "导入失败,数据不完整,请重新导出文件")
public static i18n Commands_Operator_ImportDBIncompleteFail;
@i18nField(defaultValue = "用法: /dominion template create <模板名称>")
public static i18n Commands_Template_CreateTemplateUsage;
@ -327,14 +318,18 @@ public class Translation extends Localization {
public static i18n Messages_SetMapColorSuccess;
@i18nField(defaultValue = "尺寸不合法")
public static i18n Messages_SizeInvalid;
@i18nField(defaultValue = "领地的任意一边长度不得小于4")
public static i18n Messages_SizeShouldBeGreaterThan4;
@i18nField(defaultValue = "领地X方向(东西)长度不能超过 %d")
public static i18n Messages_SizeXShouldBeLessThan;
@i18nField(defaultValue = "领地Y方向(上下)高度不能超过 %d")
public static i18n Messages_SizeYShouldBeLessThan;
@i18nField(defaultValue = "领地Z方向(南北)长度不能超过 %d")
public static i18n Messages_SizeZShouldBeLessThan;
@i18nField(defaultValue = "领地X方向(东西)长度不能少于 %d")
public static i18n Messages_SizeXShouldBeGreaterThan;
@i18nField(defaultValue = "领地Y方向(上下)高度不能少于 %d")
public static i18n Messages_SizeYShouldBeGreaterThan;
@i18nField(defaultValue = "领地Z方向(南北)长度不能少于 %d")
public static i18n Messages_SizeZShouldBeGreaterThan;
@i18nField(defaultValue = "领地Y坐标上限不能超过 %d")
public static i18n Messages_MaxYShouldBeLessThan;
@i18nField(defaultValue = "领地Y坐标下限不能超过 %d")
@ -597,10 +592,6 @@ public class Translation extends Localization {
public static i18n TUI_Menu_AllDominionButton;
@i18nField(defaultValue = "查看所有领地")
public static i18n TUI_Menu_AllDominionDescription;
@i18nField(defaultValue = "系统配置")
public static i18n TUI_Menu_ConfigButton;
@i18nField(defaultValue = "查看/修改系统配置")
public static i18n TUI_Menu_ConfigDescription;
@i18nField(defaultValue = "重载缓存")
public static i18n TUI_Menu_ReloadCacheButton;
@i18nField(defaultValue = "手动刷新缓存可解决一些玩家操作无效问题,不建议频繁操作")
@ -831,18 +822,34 @@ public class Translation extends Localization {
@i18nField(defaultValue = "AutoCreateRadius 不能等于 0已重置为 10")
public static i18n Config_Check_AutoCreateRadiusError;
@i18nField(defaultValue = "MessageDisplay 不能设置为 %s已重置为 ACTION_BAR")
public static i18n Config_Check_MessageDisplayError;
@i18nField(defaultValue = "AutoCleanAfterDays 不能等于 0已重置为 180")
public static i18n Config_Check_AutoCleanAfterDaysError;
@i18nField(defaultValue = "工具名称设置错误,已重置为 ARROW")
@i18nField(defaultValue = "Tool 名称设置错误,已重置为 ARROW")
public static i18n Config_Check_ToolNameError;
@i18nField(defaultValue = "InfoTool 名称设置错误,已重置为 STRING")
public static i18n Config_Check_InfoToolNameError;
@i18nField(defaultValue = "%s 的 MinY 不能大于等于 MaxY已重置为 -64 和 320")
public static i18n Config_Check_GroupMinYError;
@i18nField(defaultValue = "%s 的 SizeX 设置过小,已重置为 128")
public static i18n Config_Check_GroupSizeXError;
@i18nField(defaultValue = "%s 的 SizeY 设置过小,已重置为 64")
public static i18n Config_Check_GroupSizeYError;
@i18nField(defaultValue = "%s 的 SizeZ 设置过小,已重置为 128")
public static i18n Config_Check_GroupSizeZError;
@i18nField(defaultValue = "%s 的 Size.MaxX 设置过小,已重置为 128")
public static i18n Config_Check_GroupSizeMaxXError;
@i18nField(defaultValue = "%s 的 Size.MaxY 设置过小,已重置为 64")
public static i18n Config_Check_GroupSizeMaxYError;
@i18nField(defaultValue = "%s 的 Size.MaxZ 设置过小,已重置为 128")
public static i18n Config_Check_GroupSizeMaxZError;
@i18nField(defaultValue = "%s 的 Size.MinX 设置过小,已重置为 4")
public static i18n Config_Check_GroupSizeMinXError;
@i18nField(defaultValue = "%s 的 Size.MinY 设置过小,已重置为 4")
public static i18n Config_Check_GroupSizeMinYError;
@i18nField(defaultValue = "%s 的 Size.MinZ 设置过小,已重置为 4")
public static i18n Config_Check_GroupSizeMinZError;
@i18nField(defaultValue = "%s 的 Size.MaxX 不能小于 MinX已重置为 128 和 4")
public static i18n Config_Check_GroupMaxMinXError;
@i18nField(defaultValue = "%s 的 Size.MinY 不能小于 MinY已重置为 64 和 4")
public static i18n Config_Check_GroupMaxMinYError;
@i18nField(defaultValue = "%s 的 Size.MaxZ 不能小于 MinZ已重置为 128 和 4")
public static i18n Config_Check_GroupMaxMinZError;
@i18nField(defaultValue = "%s 的 Amount 设置不合法,已重置为 10")
public static i18n Config_Check_GroupAmountError;
@i18nField(defaultValue = "%s 的 Depth 设置不合法,已重置为 3")
@ -862,6 +869,16 @@ public class Translation extends Localization {
public static i18n Config_Comment_Language;
@i18nField(defaultValue = "自动创建领地的半径,单位为方块")
public static i18n Config_Comment_AutoCreateRadius;
@i18nField(defaultValue = "默认进入领地提示消息")
public static i18n Config_Comment_DefaultJoinMessage;
@i18nField(defaultValue = "默认离开领地提示消息")
public static i18n Config_Comment_DefaultLeaveMessage;
@i18nField(defaultValue = "提示消息显示位置BOSS_BAR, ACTION_BAR, TITLE, SUBTITLE, CHAT")
public static i18n Config_Comment_MessageDisplay;
@i18nField(defaultValue = "玩家没有权限时的提示消息位置")
public static i18n Config_Comment_MessageDisplayNoPermission;
@i18nField(defaultValue = "进入/离开领地时的提示消息位置")
public static i18n Config_Comment_MessageDisplayJoinLeave;
@i18nField(defaultValue = "-1表示不开启")
public static i18n Config_Comment_NegativeOneDisabled;
@i18nField(defaultValue = "默认玩家圈地限制")
@ -875,11 +892,17 @@ public class Translation extends Localization {
@i18nField(defaultValue = "-1表示不限制")
public static i18n Config_Comment_NegativeOneUnlimited;
@i18nField(defaultValue = "X方向最大长度")
public static i18n Config_Comment_SizeX;
public static i18n Config_Comment_SizeMaxX;
@i18nField(defaultValue = "Y方向最大长度")
public static i18n Config_Comment_SizeY;
public static i18n Config_Comment_SizeMaxY;
@i18nField(defaultValue = "Z方向最大长度")
public static i18n Config_Comment_SizeZ;
public static i18n Config_Comment_SizeMaxZ;
@i18nField(defaultValue = "X方向最小长度")
public static i18n Config_Comment_SizeMinX;
@i18nField(defaultValue = "Y方向最小长度")
public static i18n Config_Comment_SizeMinY;
@i18nField(defaultValue = "Z方向最小长度")
public static i18n Config_Comment_SizeMinZ;
@i18nField(defaultValue = "最大领地数量")
public static i18n Config_Comment_Amount;
@i18nField(defaultValue = "子领地深度")
@ -900,6 +923,8 @@ public class Translation extends Localization {
public static i18n Config_Comment_AutoCleanAfterDays;
@i18nField(defaultValue = "圈地工具名称")
public static i18n Config_Comment_ToolName;
@i18nField(defaultValue = "查询领地信息工具名称")
public static i18n Config_Comment_InfoToolName;
@i18nField(defaultValue = "经济设置")
public static i18n Config_Comment_Economy;
@i18nField(defaultValue = "需要安装 Vault 前置及插件")
@ -944,6 +969,31 @@ public class Translation extends Localization {
@i18nField(defaultValue = "管理领地内的其他成员权限")
public static i18n Flags_admin_Description;
@i18nField(defaultValue = "已选择第一个点: %d %d %d")
public static i18n Tool_SelectFirstPoint;
@i18nField(defaultValue = "已选择第二个点: %d %d %d")
public static i18n Tool_SelectSecondPoint;
@i18nField(defaultValue = "两个点不在同一个世界")
public static i18n Tool_NotSameWorld;
@i18nField(defaultValue = "已选择两个点,可以使用 /dominion create <领地名称> 创建领地")
public static i18n Tool_SelectTwoPoints;
@i18nField(defaultValue = "预计领地创建价格为 %.2f %s")
public static i18n Tool_CreateDominionPrice;
@i18nField(defaultValue = "尺寸: %d x %d x %d")
public static i18n Tool_DominionSize;
@i18nField(defaultValue = "面积: %d")
public static i18n Tool_DominionSquare;
@i18nField(defaultValue = "体积: %d")
public static i18n Tool_DominionVolume;
@i18nField(defaultValue = "高度: %d")
public static i18n Tool_DominionHeight;
@i18nField(defaultValue = "这个方块(%d, %d, %d)不在任何领地内")
public static i18n Tool_LocationNotInDominion;
@i18nField(defaultValue = "这个方块(%d, %d, %d)在领地 %s 内")
public static i18n Tool_LocationInDominion;
@i18nField(defaultValue = "领地主人: %s")
public static i18n Tool_DominionOwner;
public Translation(JavaPlugin plugin) {
super(plugin);

View File

@ -9,13 +9,15 @@ import java.util.Map;
public class WorldSetting {
public Integer min_y;
public Integer max_y;
public Integer size_x;
public Integer size_y;
public Integer size_z;
public Integer size_max_x;
public Integer size_max_y;
public Integer size_max_z;
public Integer size_min_x;
public Integer size_min_y;
public Integer size_min_z;
public Integer amount;
public Integer depth;
public Boolean vert;
public Boolean allow = true;
private final String sourceName;
/**
@ -27,13 +29,15 @@ public class WorldSetting {
YamlConfiguration section = new YamlConfiguration();
section.set("some_world_name.MinY", -64);
section.set("some_world_name.MaxY", 320);
section.set("some_world_name.SizeX", 128);
section.set("some_world_name.SizeY", 64);
section.set("some_world_name.SizeZ", 128);
section.set("some_world_name.Size.MaxX", 128);
section.set("some_world_name.Size.MaxY", 64);
section.set("some_world_name.Size.MaxZ", 128);
section.set("some_world_name.Size.MinX", 4);
section.set("some_world_name.Size.MinY", 4);
section.set("some_world_name.Size.MinZ", 4);
section.set("some_world_name.Amount", 10);
section.set("some_world_name.Depth", 3);
section.set("some_world_name.Vert", false);
section.set("some_world_name.Allow", false);
return section;
}
@ -47,13 +51,27 @@ public class WorldSetting {
WorldSetting setting = new WorldSetting(sourceName);
setting.min_y = worldSettings.getInt(worldName + ".MinY", -64);
setting.max_y = worldSettings.getInt(worldName + ".MaxY", 320);
setting.size_x = worldSettings.getInt(worldName + ".SizeX", 128);
setting.size_y = worldSettings.getInt(worldName + ".SizeY", 64);
setting.size_z = worldSettings.getInt(worldName + ".SizeZ", 128);
if (worldSettings.contains(worldName + ".SizeX")) { // todo: should be removed in the future
setting.size_max_x = worldSettings.getInt(worldName + ".SizeX", 128);
setting.size_max_y = worldSettings.getInt(worldName + ".SizeY", 64);
setting.size_max_z = worldSettings.getInt(worldName + ".SizeZ", 128);
setting.size_min_x = 4;
setting.size_min_y = 4;
setting.size_min_z = 4;
} else {
setting.size_max_x = worldSettings.getInt(worldName + ".Size.MaxX", 128);
setting.size_max_y = worldSettings.getInt(worldName + ".Size.MaxY", 64);
setting.size_max_z = worldSettings.getInt(worldName + ".Size.MaxZ", 128);
setting.size_min_x = worldSettings.getInt(worldName + ".Size.MinX", 4);
setting.size_min_y = worldSettings.getInt(worldName + ".Size.MinY", 4);
setting.size_min_z = worldSettings.getInt(worldName + ".Size.MinZ", 4);
}
setting.amount = worldSettings.getInt(worldName + ".Amount", 10);
setting.depth = worldSettings.getInt(worldName + ".Depth", 3);
setting.vert = worldSettings.getBoolean(worldName + ".Vert", false);
setting.allow = worldSettings.getBoolean(worldName + ".Allow", false);
if (worldSettings.contains(worldName + ".Allow") && !worldSettings.getBoolean(worldName + ".Allow")) {
setting.amount = 0;
}
world_limits.put(worldName, setting);
}
return world_limits;
@ -63,13 +81,15 @@ public class WorldSetting {
YamlConfiguration section = new YamlConfiguration();
section.set("MinY", min_y);
section.set("MaxY", max_y);
section.set("SizeX", size_x);
section.set("SizeY", size_y);
section.set("SizeZ", size_z);
section.set("Size.MaxX", size_max_x);
section.set("Size.MaxY", size_max_y);
section.set("Size.MaxZ", size_max_z);
section.set("Size.MinX", size_min_x);
section.set("Size.MinY", size_min_y);
section.set("Size.MinZ", size_min_z);
section.set("Amount", amount);
section.set("Depth", depth);
section.set("Vert", vert);
section.set("Allow", allow);
return section;
}
@ -79,19 +99,46 @@ public class WorldSetting {
min_y = -64;
max_y = 320;
}
if (size_x <= 4 && size_x != -1) {
XLogger.err(Translation.Config_Check_GroupSizeXError, sourceName);
size_x = 128;
if (size_max_x <= 4 && size_max_x != -1) {
XLogger.err(Translation.Config_Check_GroupSizeMaxXError, sourceName);
size_max_x = 128;
}
if (size_y <= 4 && size_y != -1) {
XLogger.err(Translation.Config_Check_GroupSizeYError, sourceName);
size_y = 64;
if (size_max_y <= 4 && size_max_y != -1) {
XLogger.err(Translation.Config_Check_GroupSizeMaxYError, sourceName);
size_max_y = 64;
}
if (size_z <= 4 && size_z != -1) {
XLogger.err(Translation.Config_Check_GroupSizeZError, sourceName);
size_z = 128;
if (size_max_z <= 4 && size_max_z != -1) {
XLogger.err(Translation.Config_Check_GroupSizeMaxZError, sourceName);
size_max_z = 128;
}
if (amount <= 0 && amount != -1) {
if (size_min_x <= 0) {
XLogger.err(Translation.Config_Check_GroupSizeMinXError, sourceName);
size_min_x = 4;
}
if (size_min_y <= 0) {
XLogger.err(Translation.Config_Check_GroupSizeMinYError, sourceName);
size_min_y = 4;
}
if (size_min_z <= 0) {
XLogger.err(Translation.Config_Check_GroupSizeMinZError, sourceName);
size_min_z = 4;
}
if (size_max_x < size_min_x && size_max_x != -1) {
XLogger.err(Translation.Config_Check_GroupMaxMinXError, sourceName);
size_max_x = 128;
size_min_x = 4;
}
if (size_max_y < size_min_y && size_max_y != -1) {
XLogger.err(Translation.Config_Check_GroupMaxMinYError, sourceName);
size_max_y = 64;
size_min_y = 4;
}
if (size_max_z < size_min_z && size_max_z != -1) {
XLogger.err(Translation.Config_Check_GroupMaxMinZError, sourceName);
size_max_z = 128;
size_min_z = 4;
}
if (amount < 0 && amount != -1) {
XLogger.err(Translation.Config_Check_GroupAmountError, sourceName);
amount = 10;
}

View File

@ -34,7 +34,7 @@ public class CreateDominion {
Map<Integer, Location> points = autoPoints(sender);
operator.getResponse().thenAccept(result -> {
if (Objects.equals(result.getStatus(), AbstractOperator.Result.SUCCESS)) {
DominionManage.show(sender, new String[]{"list"});
DominionManage.show(sender, new String[]{"manage", input});
}
});
DominionController.create(operator, input, points.get(0), points.get(1));

View File

@ -9,11 +9,6 @@ import cn.lunadeer.minecraftpluginutils.Notification;
import cn.lunadeer.minecraftpluginutils.stui.ListView;
import cn.lunadeer.minecraftpluginutils.stui.components.Button;
import cn.lunadeer.minecraftpluginutils.stui.components.Line;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextColor;
import net.kyori.adventure.text.format.TextDecoration;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

View File

@ -36,7 +36,7 @@ public class EnvSetting {
.append(Button.create(Translation.TUI_Navigation_DominionList).setExecuteCommand("/dominion list").build())
.append(Button.create(Translation.TUI_Navigation_Manage).setExecuteCommand("/dominion manage " + dominion.getName()).build())
.append(Translation.TUI_Navigation_EnvSetting));
for (Flag flag : Flag.getDominionOnlyFlagsEnabled()) {
for (Flag flag : Flag.getEnvironmentFlagsEnabled()) {
view.add(createOption(flag, dominion.getFlagValue(flag), dominion.getName(), page));
}
view.showOn(player, page);

View File

@ -63,14 +63,14 @@ public class GroupList {
for (GroupDTO group : groups) {
Line line = new Line();
Button del = Button.createRed(Translation.TUI_DeleteButton)
.setHoverText(String.format(Translation.TUI_GroupList_DeleteDescription.trans(), group.getName()))
.setExecuteCommand("/dominion group delete " + dominion.getName() + " " + group.getName());
.setHoverText(String.format(Translation.TUI_GroupList_DeleteDescription.trans(), group.getNamePlain()))
.setExecuteCommand("/dominion group delete " + dominion.getName() + " " + group.getNamePlain());
Button edit = Button.create(Translation.TUI_EditButton)
.setHoverText(String.format(Translation.TUI_GroupList_EditDescription.trans(), group.getName()))
.setExecuteCommand("/dominion group setting " + dominion.getName() + " " + group.getName());
.setHoverText(String.format(Translation.TUI_GroupList_EditDescription.trans(), group.getNamePlain()))
.setExecuteCommand("/dominion group setting " + dominion.getName() + " " + group.getNamePlain());
Button add = Button.createGreen("+")
.setHoverText(String.format(Translation.TUI_GroupList_AddMemberDescription.trans(), group.getName()))
.setExecuteCommand("/dominion group select_member " + dominion.getName() + " " + group.getName() + " " + page);
.setHoverText(String.format(Translation.TUI_GroupList_AddMemberDescription.trans(), group.getNamePlain()))
.setExecuteCommand("/dominion group select_member " + dominion.getName() + " " + group.getNamePlain() + " " + page);
line.append(del.build()).append(edit.build()).append(group.getNameColoredComponent()).append(add.build());
view.add(line);
List<MemberDTO> players = MemberDTO.selectByGroupId(group.getId());
@ -80,9 +80,9 @@ public class GroupList {
if (p == null) continue;
Button remove = Button.createRed("-")
.setHoverText(
String.format(Translation.TUI_GroupList_RemoveMemberDescription.trans(), p.getLastKnownName(), group.getName())
String.format(Translation.TUI_GroupList_RemoveMemberDescription.trans(), p.getLastKnownName(), group.getNamePlain())
)
.setExecuteCommand("/dominion group remove_member " + dominion.getName() + " " + group.getName() + " " + p.getLastKnownName() + " " + page);
.setExecuteCommand("/dominion group remove_member " + dominion.getName() + " " + group.getNamePlain() + " " + p.getLastKnownName() + " " + page);
Line playerLine = new Line().setDivider("");
playerLine.append(Component.text(" "));
playerLine.append(remove.build()).append(" | " + p.getLastKnownName());

View File

@ -45,7 +45,7 @@ public class GroupSetting {
return;
}
ListView view = ListView.create(10, "/dominion group setting " + dominion.getName() + " " + group.getName());
ListView view = ListView.create(10, "/dominion group setting " + dominion.getName() + " " + group.getNamePlain());
view.title(Component.text(Translation.TUI_GroupSetting_TitleL.trans())
.append(group.getNameColoredComponent())
.append(Component.text(Translation.TUI_GroupSetting_TitleR.trans())));
@ -58,31 +58,31 @@ public class GroupSetting {
.append(Translation.TUI_Navigation_GroupSetting)
);
Button rename_btn = Button.create(Translation.TUI_GroupSetting_RenameButton)
.setHoverText(String.format(Translation.TUI_GroupSetting_RenameDescription.trans(), group.getName()))
.setExecuteCommand("/dominion cui_rename_group " + dominion.getName() + " " + group.getName());
.setHoverText(String.format(Translation.TUI_GroupSetting_RenameDescription.trans(), group.getNamePlain()))
.setExecuteCommand("/dominion cui_rename_group " + dominion.getName() + " " + group.getNamePlain());
view.add(Line.create().append(rename_btn.build()));
if (group.getAdmin()) {
view.add(Line.create()
.append(Button.createGreen("")
.setExecuteCommand(parseCommand(dominion.getName(), group.getName(), "admin", false, page))
.setExecuteCommand(parseCommand(dominion.getName(), group.getNamePlain(), "admin", false, page))
.build())
.append(
Component.text(Translation.Flags_admin_DisplayName.trans())
.hoverEvent(Component.text(Translation.Flags_admin_Description.trans()))
));
view.add(createOption(Flag.GLOW, group.getFlagValue(Flag.GLOW), dominion.getName(), group.getName(), page));
view.add(createOption(Flag.GLOW, group.getFlagValue(Flag.GLOW), dominion.getName(), group.getNamePlain(), page));
} else {
view.add(Line.create()
.append(Button.createRed("")
.setExecuteCommand(parseCommand(dominion.getName(), group.getName(), "admin", true, page))
.setExecuteCommand(parseCommand(dominion.getName(), group.getNamePlain(), "admin", true, page))
.build())
.append(
Component.text(Translation.Flags_admin_DisplayName.trans())
.hoverEvent(Component.text(Translation.Flags_admin_Description.trans()))
));
for (Flag flag : Flag.getPrivilegeFlagsEnabled()) {
view.add(createOption(flag, group.getFlagValue(flag), dominion.getName(), group.getName(), page));
view.add(createOption(flag, group.getFlagValue(flag), dominion.getName(), group.getNamePlain(), page));
}
}
view.showOn(player, page);

View File

@ -39,9 +39,9 @@ public class SelectMember {
}
int backPage = getPage(args, 4);
int page = getPage(args, 5);
ListView view = ListView.create(10, "/dominion group select_member " + dominion.getName() + " " + group.getName() + " " + backPage);
ListView view = ListView.create(10, "/dominion group select_member " + dominion.getName() + " " + group.getNamePlain() + " " + backPage);
view.title(Translation.TUI_SelectMember_Title);
Line sub = Line.create().append(String.format(Translation.TUI_SelectMember_Description.trans(), group.getName()))
Line sub = Line.create().append(String.format(Translation.TUI_SelectMember_Description.trans(), group.getNamePlain()))
.append(Button.create(Translation.TUI_BackButton).setExecuteCommand("/dominion group list " + dominion.getName() + " " + backPage).build());
view.subtitle(sub);
List<MemberDTO> members = MemberDTO.selectByDomGroupId(dominion.getId(), -1);
@ -50,7 +50,7 @@ public class SelectMember {
if (p == null) continue;
view.add(Line.create()
.append(Button.create(p.getLastKnownName())
.setExecuteCommand("/dominion group add_member " + dominion.getName() + " " + group.getName() + " " + p.getLastKnownName() + " " + backPage)
.setExecuteCommand("/dominion group add_member " + dominion.getName() + " " + group.getNamePlain() + " " + p.getLastKnownName() + " " + backPage)
.build()));
}
view.showOn(player, page);

View File

@ -99,7 +99,7 @@ public class MemberList {
}
}
if (group != null) {
prev.setDisabled(String.format(Translation.TUI_MemberList_BelongToGroup.trans(), group.getName()));
prev.setDisabled(String.format(Translation.TUI_MemberList_BelongToGroup.trans(), group.getNamePlain()));
}
line.append(remove.build());
line.append(prev.build());

View File

@ -7,12 +7,6 @@ import cn.lunadeer.dominion.dtos.Flag;
import cn.lunadeer.dominion.dtos.GroupDTO;
import cn.lunadeer.dominion.dtos.MemberDTO;
import cn.lunadeer.dominion.managers.Translation;
import cn.lunadeer.minecraftpluginutils.Notification;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextColor;
import net.kyori.adventure.text.format.TextDecoration;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.inventory.Inventory;
@ -77,11 +71,9 @@ public class EventUtils {
return true;
}
}
TextComponent msg = Component.text(
String.format(Translation.Messages_NoPermissionForFlag.trans(), flag.getDisplayName(), flag.getDescription()),
Style.style(TextColor.color(0xFF0000), TextDecoration.BOLD))
.hoverEvent(Component.text(flag.getDescription()));
Notification.actionBar(player, msg);
String msg = String.format(Translation.Messages_NoPermissionForFlag.trans(), flag.getDisplayName(), flag.getDescription());
msg = "&#FF0000" + "&l" + msg;
MessageDisplay.show(player, Dominion.config.getMessageDisplayNoPermission(), msg);
if (event != null) {
event.setCancelled(true);
}

View File

@ -0,0 +1,37 @@
package cn.lunadeer.dominion.utils;
import cn.lunadeer.minecraftpluginutils.ColorParser;
import cn.lunadeer.minecraftpluginutils.Notification;
import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
public class MessageDisplay {
public enum Place {
BOSS_BAR,
ACTION_BAR,
TITLE,
SUBTITLE,
CHAT
}
public static void show(Player player, Place place, String message) {
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
message = PlaceholderAPI.setPlaceholders(player, message);
}
message = ColorParser.getBukkitType(message);
// BOSS_BAR, ACTION_BAR, TITLE, SUBTITLE, CHAT
if (place == Place.BOSS_BAR) {
Notification.bossBar(player, message);
} else if (place == Place.CHAT) {
player.sendMessage(message);
} else if (place == Place.TITLE) {
Notification.title(player, message);
} else if (place == Place.SUBTITLE) {
Notification.subTitle(player, message);
} else {
Notification.actionBar(player, message);
}
}
}

View File

@ -6,7 +6,6 @@ import cn.lunadeer.dominion.dtos.MemberDTO;
import cn.lunadeer.dominion.managers.Translation;
import cn.lunadeer.minecraftpluginutils.Notification;
import cn.lunadeer.minecraftpluginutils.stui.ListView;
import cn.lunadeer.minecraftpluginutils.stui.components.Button;
import cn.lunadeer.minecraftpluginutils.stui.components.Line;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

View File

@ -1,7 +1,7 @@
package cn.lunadeer.dominion.utils.map;
import cn.lunadeer.dominion.Cache;
import cn.lunadeer.dominion.dtos.DominionDTO;
import cn.lunadeer.dominion.api.dtos.DominionDTO;
import cn.lunadeer.dominion.dtos.PlayerDTO;
import cn.lunadeer.dominion.managers.Translation;
import cn.lunadeer.minecraftpluginutils.Scheduler;
@ -22,7 +22,7 @@ public class BlueMapConnect {
try {
BlueMapAPI.getInstance().ifPresent(api -> {
Map<String, List<DominionDTO>> world_dominions = new HashMap<>();
for (DominionDTO dominion : Cache.instance.getDominions()) {
for (DominionDTO dominion : Cache.instance.getAllDominions()) {
if (dominion.getWorld() == null) {
continue;
}

View File

@ -1,6 +1,6 @@
package cn.lunadeer.dominion.utils.map;
import cn.lunadeer.dominion.dtos.DominionDTO;
import cn.lunadeer.dominion.api.dtos.DominionDTO;
import cn.lunadeer.dominion.dtos.PlayerDTO;
import cn.lunadeer.dominion.managers.Translation;
import cn.lunadeer.minecraftpluginutils.Scheduler;

View File

@ -14,7 +14,7 @@ public class MapRender {
}
if (Dominion.config.getDynmap()) {
DynmapConnect.instance.setDominionMarkers(Cache.instance.getDominions());
DynmapConnect.instance.setDominionMarkers(Cache.instance.getAllDominions());
}
}

View File

@ -9,14 +9,24 @@ Database:
Language: zh-cn
AutoCreateRadius: 10
DefaultJoinMessage: '&3{OWNER}: Welcome to {DOM}!'
DefaultLeaveMessage: '&3{OWNER}: Leaving {DOM}...'
MessageDisplay:
NoPermission: ACTION_BAR
JoinLeave: ACTION_BAR
Limit:
SpawnProtection: 10
MinY: -64
MaxY: 320
SizeX: 128
SizeY: 64
SizeZ: 128
Size:
MaxX: 128
MaxY: 64
MaxZ: 128
MinX: 4
MinY: 4
MinZ: 4
Amount: 10
Depth: 3
Vert: false
@ -25,13 +35,16 @@ Limit:
some_world_name:
MinY: -64
MaxY: 320
SizeX: 128
SizeY: 64
SizeZ: 128
Size:
MaxX: 128
MaxY: 64
MaxZ: 128
MinX: 4
MinY: 4
MinZ: 4
Amount: 10
Depth: 3
Vert: false
Allow: false
Teleport:
Enable: true
@ -42,6 +55,8 @@ AutoCleanAfterDays: 180
Tool: ARROW
InfoTool: STRING
Economy:
Enable: false
Price: 10.0

View File

@ -1,8 +1,12 @@
MinY: -64
MaxY: 320
SizeX: 128
SizeY: 64
SizeZ: 128
Size:
MaxX: 128
MaxY: 64
MaxZ: 128
MinX: 4
MinY: 4
MinZ: 4
Amount: 10
Depth: 3
Vert: false
@ -13,10 +17,13 @@ WorldSettings:
some_world_name:
MinY: -64
MaxY: 320
SizeX: 128
SizeY: 64
SizeZ: 128
Size:
MaxX: 128
MaxY: 64
MaxZ: 128
MinX: 4
MinY: 4
MinZ: 4
Amount: 10
Depth: 3
Vert: false
Allow: false

View File

@ -3,10 +3,12 @@ version: @version@
main: cn.lunadeer.dominion.Dominion
api-version: '1.20'
folia-supported: true
libraries: [ ]
softdepend:
- Vault
- dynmap
- PlaceholderAPI
- BlueMap
commands:
Dominion:
description: 领地插件命令
@ -18,4 +20,4 @@ permissions:
default: op
dominion.default:
description: 领地插件用户权限
default: true
default: true

View File

@ -1,6 +1,15 @@
## Dominion Documentation
## Preface
[![GitHub Repository](https://img.shields.io/badge/SourceCode-GitHub-blue?logo=github)](https://github.com/ColdeZhang/Dominion)
[![bStats](https://img.shields.io/badge/bStats-Statistics-eacd76?logo=google-analytics)](https://bstats.org/plugin/bukkit/Dominion/21445)
[![Hangar](https://img.shields.io/badge/To-Hangar-004ee9)](https://hangar.papermc.io/zhangyuheng/Dominion)
[![Modrinth](https://img.shields.io/badge/To-Modrinth-1bd96a)](https://modrinth.com/plugin/zhangyuheng-dominion)
[![Spigot](https://img.shields.io/badge/To-Spigot-ed8106)](https://www.spigotmc.org/resources/dominion.119514/)
[![Latest Build](https://img.shields.io/github/v/release/ColdeZhang/Dominion?label=LatestBuild&logo=github&color=0aa344)](https://github.com/ColdeZhang/Dominion/releases/latest)
## Brief
First of all, thank you very much for choosing and using this plugin.

View File

@ -5,7 +5,7 @@
* [Territory Management](manage-dominion/README.md)
* [Environment Settings](manage-dominion/environment.md)
* [Permission Management](manage-dominion/permission/README.md)
* [Guest Permissions](manage-dominion/permission/guest)
* [Guest Permissions](manage-dominion/permission/guest.md)
* [Territory members](manage-dominion/permission/member.md)
* [Permission Groups](manage-dominion/permission/permission-group.md)
* [Permission Templates](manage-dominion/permission/template.md)
@ -20,4 +20,5 @@
* [Configuration file reference](operator/config.md)
* [flags.yml](operator/flags.md)
* [Privileged Player Configuration](operator/privilege.md)
* [Cross-group teleportation (global-tp in testing)](operator/global-tp.md)
* [Cross-group teleportation (global-tp in testing)](operator/global-tp.md)
* [Developer](developer.md)

99
docs/en-us/developer.md Normal file
View File

@ -0,0 +1,99 @@
# 开发者文档
> DominionAPI 自 Dominion-2.9.0-beta 开始支持。
## 一、接入 DominionAPI
### 1. 引入依赖
如果您使用 gradle可以在您的 `build.gradle` 文件中添加如下代码:
```groovy
// build.gradle
repositories {
maven { url = "https://ssl.lunadeer.cn:14454/repository/maven-snapshots/" }
}
dependencies {
compileOnly("cn.lunadeer:DominionAPI:2.1-SNAPSHOT")
}
```
或者你使用的是 gradle kotlin dsl
```kotlin
// build.gradle.kts
repositories {
maven("https://ssl.lunadeer.cn:14454/repository/maven-snapshots/")
}
dependencies {
compileOnly("cn.lunadeer:DominionAPI:2.1-SNAPSHOT")
}
```
再或者您使用 maven可以在您的 `pom.xml` 文件中添加如下代码:
```xml
<!-- pom.xml -->
<repositories>
<repository>
<id>lunadeer</id>
<url>https://ssl.lunadeer.cn:14454/repository/maven-snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>cn.lunadeer</groupId>
<artifactId>DominionAPI</artifactId>
<version>2.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
```
### 2. plugin.yml 配置
在您的插件的 `plugin.yml` 文件中添加如下配置,以确保在 Dominion 准备完成后再加载您的插件:
```yaml
# plugin.yml
depend: [ Dominion ]
```
## 二、使用 DominionAPI
可以通过如下方法直接获取 DominionAPI 实例:
```java
import cn.lunadeer.dominion.api.Dominion;
import cn.lunadeer.dominion.api.DominionAPI;
DominionAPI dominionAPI = Dominion.getInstance();
```
例如,获取某个位置的领地信息:
```java
@Override
public void onEnable() {
// Plugin startup logic
try {
DominionAPI dominionAPI = Dominion.getInstance();
DominionDTO d = dominionAPI.getDominionByLoc(some_location);
if (d == null) {
this.getLogger().info("no dominion found");
return;
}
this.getLogger().info("name:" + d.getName());
} catch (Exception e) {
this.getLogger().info(e.getMessage());
}
}
```
[示例项目地址](https://github.com/ColdeZhang/DominionAddonExample)。
[Javadoc地址](https://coldezhang.github.io/DominionAPI/)。

View File

@ -4,7 +4,6 @@
- 1.20.1 及以上;
- Spigot、Paper、Folia...
- Java 21 及以上;
> 虽然本插件支持 Spigot 但是我们强烈推荐您升级到 Paper 或其分支核心(如 Purpur以获得更好的性能体验。

View File

@ -101,6 +101,9 @@ Timer: false # 性能测试计时器
语言设置,参考 languages 文件夹下的文件名。
如果需要更新语言文件,请删除 `plugins/Dominion/languages` 文件夹下对应的文件,然后重启服务器。
插件会自动生成最新的对应语言文件。
### AutoCreateRadius
配置玩家在使用“自动创建”功能时会自动向XYZ三个方向延伸此距离创建领地。

View File

@ -1,5 +1,12 @@
# Dominion 文档
[![GitHub Repository](https://img.shields.io/badge/仓库地址-GitHub-blue?logo=github)](https://github.com/ColdeZhang/Dominion)
[![bStats](https://img.shields.io/badge/bStats-数据统计-eacd76?logo=google-analytics)](https://bstats.org/plugin/bukkit/Dominion/21445)
[![Latest Build](https://img.shields.io/github/v/release/ColdeZhang/Dominion?label=%E6%9C%80%E6%96%B0%E6%9E%84%E5%BB%BA%E4%B8%8B%E8%BD%BD&logo=github&color=0aa344)](https://github.com/ColdeZhang/Dominion/releases/latest)
[![Latest Build](https://img.shields.io/github/v/release/ColdeZhang/Dominion?label=%E5%A4%87%E7%94%A8%E4%B8%8B%E8%BD%BD%E5%9C%B0%E5%9D%80&logo=gitea&color=0aa344)](https://ssl.lunadeer.cn:14446/mirror/Dominion/releases)
## 前言
首先十分感谢您选择并使用本插件。
@ -18,3 +25,6 @@ Dominion 是一个完全开源、免费,专为高版本开发,面向未来
1. [安装、必读、常见问题](operator/README.md)
2. [配置文件参考](operator/config.md)
什么,你是新手服主?推荐通读一下[驿站](https://github.com/postyizhan)大佬的 [笨蛋文档|一群笨蛋们写的 Minecraft 开服教程](https://yizhan.wiki/NitWikit/Java/intro)。
希望能对你的开服之路有所帮助!

View File

@ -5,7 +5,7 @@
* [领地管理](manage-dominion/README.md)
* [环境设置](manage-dominion/environment.md)
* [权限管理](manage-dominion/permission/README.md)
* [访客权限](manage-dominion/permission/guest)
* [访客权限](manage-dominion/permission/guest.md)
* [领地成员](manage-dominion/permission/member.md)
* [权限组](manage-dominion/permission/permission-group.md)
* [权限模板](manage-dominion/permission/template.md)
@ -20,5 +20,7 @@
* [配置文件参考](operator/config.md)
* [flags.yml](operator/flags.md)
* [特权玩家配置](operator/privilege.md)
* [Papi一览](operator/papi.md)
* [跨群组服传送global-tp 测试中)](operator/global-tp.md)
* [开发者文档](developer.md)

99
docs/zh-cn/developer.md Normal file
View File

@ -0,0 +1,99 @@
# 开发者文档
> DominionAPI 自 Dominion-2.9.0-beta 开始支持。
## 一、接入 DominionAPI
### 1. 引入依赖
如果您使用 gradle可以在您的 `build.gradle` 文件中添加如下代码:
```groovy
// build.gradle
repositories {
maven { url = "https://ssl.lunadeer.cn:14454/repository/maven-snapshots/" }
}
dependencies {
compileOnly("cn.lunadeer:DominionAPI:2.1-SNAPSHOT")
}
```
或者你使用的是 gradle kotlin dsl
```kotlin
// build.gradle.kts
repositories {
maven("https://ssl.lunadeer.cn:14454/repository/maven-snapshots/")
}
dependencies {
compileOnly("cn.lunadeer:DominionAPI:2.1-SNAPSHOT")
}
```
再或者您使用 maven可以在您的 `pom.xml` 文件中添加如下代码:
```xml
<!-- pom.xml -->
<repositories>
<repository>
<id>lunadeer</id>
<url>https://ssl.lunadeer.cn:14454/repository/maven-snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>cn.lunadeer</groupId>
<artifactId>DominionAPI</artifactId>
<version>2.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
```
### 2. plugin.yml 配置
在您的插件的 `plugin.yml` 文件中添加如下配置,以确保在 Dominion 准备完成后再加载您的插件:
```yaml
# plugin.yml
depend: [ Dominion ]
```
## 二、使用 DominionAPI
可以通过如下方法直接获取 DominionAPI 实例:
```java
import cn.lunadeer.dominion.api.Dominion;
import cn.lunadeer.dominion.api.DominionAPI;
DominionAPI dominionAPI = Dominion.getInstance();
```
例如,获取某个位置的领地信息:
```java
@Override
public void onEnable() {
// Plugin startup logic
try {
DominionAPI dominionAPI = Dominion.getInstance();
DominionDTO d = dominionAPI.getDominionByLoc(some_location);
if (d == null) {
this.getLogger().info("no dominion found");
return;
}
this.getLogger().info("name:" + d.getName());
} catch (Exception e) {
this.getLogger().info(e.getMessage());
}
}
```
[示例项目地址](https://github.com/ColdeZhang/DominionAddonExample)。
[Javadoc地址](https://coldezhang.github.io/DominionAPI/)。

View File

@ -15,3 +15,17 @@
```
/dominion set_leave_msg <提示语> [领地名称]
```
## 特殊占位符
- `{OWNER}`:会被自动替换为领地主人的名字;
- `{DOM}`:会被自动替换为领地名称;
## 提示
- 提示语支持 PlaceholderAPI 占位符,例如 `%player%`
会被替换为玩家名,本插件支持的占位符请参考 [PlaceHolderApi 一览](../operator/papi.md)
- 提示语支持颜色代码,例如 `&a` 会被替换为亮绿色;
- 提示语支持渐变色,更多关于颜色的效果参见 [彩色字符](https://ssl.lunadeer.cn:14448/doc/81/)。
> PlaceholderAPI 占位符需要服务器管理员安装 PlaceholderAPI 插件方可支持。

View File

@ -15,7 +15,7 @@
## 权限
当玩家处在一个子领地内时,其行为只收到子领地的权限控制。
子领地的权限设置与领地完全相同,参考[权限管理](permission/README.md)。
子领地的权限设置与领地完全相同,参考[权限管理](permission/README.md)。
## 关于子领地嵌套

View File

@ -4,7 +4,6 @@
- 1.20.1 及以上;
- Spigot、Paper、Folia...
- Java 21 及以上;
> 虽然本插件支持 Spigot 但是我们强烈推荐您升级到 Paper 或其分支核心(如 Purpur以获得更好的性能体验。

View File

@ -16,14 +16,30 @@ Language: zh-cn
# -1表示不开启
AutoCreateRadius: 10
# 默认进入领地提示消息
DefaultJoinMessage: '&3{OWNER}: Welcome to {DOM}!'
# 默认离开领地提示消息
DefaultLeaveMessage: '&3{OWNER}: Leaving {DOM}...'
# 领地提示消息显示位置BOSS_BAR, ACTION_BAR, TITLE, SUBTITLE, CHAT
MessageDisplay:
# 玩家没有权限时的提示消息位置
NoPermission: ACTION_BAR
# 进入/离开领地时的提示消息位置
JoinLeave: SUBTITLE
# 默认玩家圈地限制
Limit:
SpawnProtection: 10 # 出生点保护半径 出生点此范围内不允许圈地-1表示不开启
MinY: -64 # 最小Y坐标
MaxY: 320 # 最大Y坐标
SizeX: 128 # X方向最大长度-1表示不限制
SizeY: 64 # Y方向最大长度-1表示不限制
SizeZ: 128 # Z方向最大长度-1表示不限制
Size:
MaxX: 628 # X方向最大长度-1表示不限制
MaxY: 64 # Y方向最大长度-1表示不限制
MaxZ: 628 # Z方向最大长度-1表示不限制
MinX: 4 # X方向最小长度
MinY: 4 # Y方向最小长度
MinZ: 4 # Z方向最小长度
Amount: 10 # 最大领地数量-1表示不限制
Depth: 3 # 子领地深度0表示不开启-1表示不限制
Vert: false # 是否自动延伸到 MaxY 和 MinY
@ -38,7 +54,6 @@ Limit:
Amount: 10
Depth: 3
Vert: false
Allow: false
Teleport:
Enable: true
@ -52,6 +67,9 @@ AutoCleanAfterDays: 180
# 圈地工具名称
Tool: ARROW
# 查询领地信息工具名称
InfoTool: STRING
# 经济设置
# 需要安装 Vault 前置及插件
Economy:
@ -101,24 +119,42 @@ Timer: false # 性能测试计时器
语言设置,参考 languages 文件夹下的文件名。
如果需要更新语言文件,请删除 `plugins/Dominion/languages` 文件夹下对应的文件,然后重启服务器。
插件会自动生成最新的对应语言文件。
### AutoCreateRadius
配置玩家在使用“自动创建”功能时会自动向XYZ三个方向延伸此距离创建领地。
### DefaultJoinMessage & DefaultLeaveMessage
默认进入领地提示消息和默认离开领地提示消息。
### MessageDisplay
配置提示消息显示位置,可选项:`BOSS_BAR`, `ACTION_BAR`, `TITLE`, `SUBTITLE`, `CHAT`
- NoPermission玩家没有权限时的提示消息位置
- JoinLeave进入/离开领地时的提示消息位置
### Limit
玩家使用此插件的一些限制:
- SpawnProtection出生点半径保护此半径范围内普通玩家无法创建领地
- MinY领地的最小Y坐标
- MaxY领地的最大Y坐标
- SizeXX方向最大长度 1表示不限制
- SizeYY方向最大长度 1表示不限制
- SizeZZ方向最大长度 1表示不限制
- Amount每个玩家拥有的最大领地数量 1表示不限制
- Size领地的大小限制
- MaxXX方向最大长度 -1表示不限制
- MaxYY方向最大长度 -1表示不限制
- MaxZZ方向最大长度 -1表示不限制
- MinXX方向最小长度 不能小于等于0 不能大于MaxX
- MinYY方向最小长度 不能小于等于0 不能大于MaxY
- MinZZ方向最小长度 不能小于等于0 不能大于MaxZ
- Amount每个玩家拥有的最大领地数量 -1表示不限制
- Depth子领地深度、0表示不允许子领地、 -1表示不限制
- Vert当设置为 `true`玩家选择区域创建或者自动创建领地会自动将Y向下向上延伸到MinY和MaxY。**同时也会根据 MinY 和 MaxY 的设置自动调整 SizeY 的配置保证数值逻辑一致。**
- Vert当设置为 `true`玩家选择区域创建或者自动创建领地会自动将Y向下向上延伸到MinY和MaxY
- WorldSettings单独设置某个世界的圈地规则如不设置则使用上述默认规则
- Allow是否允许在此世界圈地
- OpByPass是否允许OP无视领地限制
> 您服务器世界的名称应该避免使用 `default` 这样的特殊单词,否则会导致不可预料的意外错误。
@ -134,6 +170,10 @@ Timer: false # 性能测试计时器
配置手动圈地时的选取工具。如果配置错误会被设置为默认值“ARROW”箭矢。
### InfoTool
配置查询领地信息工具。如果配置错误会被设置为默认值“STRING”字符串。使用左键配合该物品点击领地内方块时会显示领地信息。
### Economy
经济控制支持,让玩家需要花费金钱圈地。使用此特性需要安装 Vault 经济前置插件。

View File

@ -1,6 +1,6 @@
# 跨群组服传送
**功能暂未上线**
**功能暂未上线**
## 新服务器配置

View File

@ -0,0 +1,8 @@
# PlaceHolderApi 一览
## `%dominion_group_title%`:权限组称号
## `%dominion_current_dominion%`:玩家当前所在领地名

View File

@ -1,5 +1,14 @@
# Dominion 文檔
[![GitHub Repository](https://img.shields.io/badge/SourceCode-GitHub-blue?logo=github)](https://github.com/ColdeZhang/Dominion)
[![bStats](https://img.shields.io/badge/bStats-Statistics-eacd76?logo=google-analytics)](https://bstats.org/plugin/bukkit/Dominion/21445)
[![Hangar](https://img.shields.io/badge/To-Hangar-004ee9)](https://hangar.papermc.io/zhangyuheng/Dominion)
[![Modrinth](https://img.shields.io/badge/To-Modrinth-1bd96a)](https://modrinth.com/plugin/zhangyuheng-dominion)
[![Spigot](https://img.shields.io/badge/To-Spigot-ed8106)](https://www.spigotmc.org/resources/dominion.119514/)
[![Latest Build](https://img.shields.io/github/v/release/ColdeZhang/Dominion?label=LatestBuild&logo=github&color=0aa344)](https://github.com/ColdeZhang/Dominion/releases/latest)
## 前言
首先十分感謝您選擇並使用本插件。

View File

@ -5,7 +5,7 @@
* [領地管理](manage-dominion/README.md)
* [環境設置](manage-dominion/environment.md)
* [權限管理](manage-dominion/permission/README.md)
* [訪客權限](manage-dominion/permission/guest)
* [訪客權限](manage-dominion/permission/guest.md)
* [領地成員](manage-dominion/permission/member.md)
* [權限組](manage-dominion/permission/permission-group.md)
* [權限模板](manage-dominion/permission/template.md)
@ -21,4 +21,5 @@
* [flags.yml](operator/flags.md)
* [特權玩家配置](operator/privilege.md)
* [跨群組服傳送global-tp 測試中)](operator/global-tp.md)
* [开发者文档](developer.md)

99
docs/zh-hk/developer.md Normal file
View File

@ -0,0 +1,99 @@
# 开发者文档
> DominionAPI 自 Dominion-2.9.0-beta 开始支持。
## 一、接入 DominionAPI
### 1. 引入依赖
如果您使用 gradle可以在您的 `build.gradle` 文件中添加如下代码:
```groovy
// build.gradle
repositories {
maven { url = "https://ssl.lunadeer.cn:14454/repository/maven-snapshots/" }
}
dependencies {
compileOnly("cn.lunadeer:DominionAPI:2.1-SNAPSHOT")
}
```
或者你使用的是 gradle kotlin dsl
```kotlin
// build.gradle.kts
repositories {
maven("https://ssl.lunadeer.cn:14454/repository/maven-snapshots/")
}
dependencies {
compileOnly("cn.lunadeer:DominionAPI:2.1-SNAPSHOT")
}
```
再或者您使用 maven可以在您的 `pom.xml` 文件中添加如下代码:
```xml
<!-- pom.xml -->
<repositories>
<repository>
<id>lunadeer</id>
<url>https://ssl.lunadeer.cn:14454/repository/maven-snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>cn.lunadeer</groupId>
<artifactId>DominionAPI</artifactId>
<version>2.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
```
### 2. plugin.yml 配置
在您的插件的 `plugin.yml` 文件中添加如下配置,以确保在 Dominion 准备完成后再加载您的插件:
```yaml
# plugin.yml
depend: [ Dominion ]
```
## 二、使用 DominionAPI
可以通过如下方法直接获取 DominionAPI 实例:
```java
import cn.lunadeer.dominion.api.Dominion;
import cn.lunadeer.dominion.api.DominionAPI;
DominionAPI dominionAPI = Dominion.getInstance();
```
例如,获取某个位置的领地信息:
```java
@Override
public void onEnable() {
// Plugin startup logic
try {
DominionAPI dominionAPI = Dominion.getInstance();
DominionDTO d = dominionAPI.getDominionByLoc(some_location);
if (d == null) {
this.getLogger().info("no dominion found");
return;
}
this.getLogger().info("name:" + d.getName());
} catch (Exception e) {
this.getLogger().info(e.getMessage());
}
}
```
[示例项目地址](https://github.com/ColdeZhang/DominionAddonExample)。
[Javadoc地址](https://coldezhang.github.io/DominionAPI/)。

View File

@ -4,7 +4,6 @@
- 1.20.1 及以上;
- Spigot、Paper、Folia...
- Java 21 及以上;
> 雖然本插件支持 Spigot 但是我們強烈推薦您升級到 Paper 或其分支核心(如 Purpur以獲得更好的性能體驗。

View File

@ -92,6 +92,9 @@ Timer: false # 性能測試計時器
語言設置,參考 languages 文件夾下的文件名。
如果需要更新语言文件,请删除 `plugins/Dominion/languages` 文件夹下对应的文件,然后重启服务器。
插件会自动生成最新的对应语言文件。
### AutoCreateRadius
配置玩家在使用「自動創建」功能時會自動向XYZ三個方向延伸此距離創建領地。

BIN
intro/imgs/Dominion-08.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -6,4 +6,5 @@
<img src="imgs/Dominion-05.png" alt="" width="100%"/>
<img src="imgs/Dominion-06.png" alt="" width="100%"/>
<img src="imgs/Dominion-07.png" alt="" width="100%"/>
<img src="imgs/Dominion-08.png" alt="" width="100%"/>
</div>

View File

@ -1,5 +1,726 @@
# Help us to translate this file into your language.
# Guide: https://github.com/ColdeZhang/Dominion/blob/master/CONTRIBUTING.md#plugin-messages
# Guide: https://github.com/ColdeZhang/Dominion/blob/master/CONTRIBUTING.md#translate-plugin-messages-
# Don't forget to leave your name here, so that we can give you credit for your translation.
# Translated by: YOUR_NAME_HERE
Commands:
Dominion:
SetFlagUsage: 'Usage: /dominion set <flag_name> <true/false> [dominion name]'
CreateDominionUsage: 'Usage: /dominion create <dominion name>'
CreateSelectPointsFirst: Please first use the tool to select the points, or use /dominion auto_create <dominion name> to create dominion automatically.
CreateSubDominionUsage: 'Usage: /dominion create_sub <sub name> [parent name]'
CreateSubSelectPointsFirst: Please first use the tool to select the points, or use /dominion auto_create_sub <sub name> [parent name] to create sub-dominion automatically.
AutoCreateDominionUsage: 'Usage: /dominion auto_create <dominion name>'
AutoCreateSubDominionUsage: 'Usage: /dominion auto_create_sub <sub name> [parent name]'
AutoCreateDominionDisabled: Automatic creation function has been disabled by operator.
ExpandDominionUsage: 'Usage: /dominion expand [size] [dominion name]'
ContractDominionUsage: 'Usage: /dominion contract [size] [dominion name]'
SizeShouldBeInteger: Size should be an integer.
SizeShouldBePositive: Size should be greater than 0.
DeleteDominionUsage: 'Usage: /dominion delete <dominion name>'
SetEnterMessageUsage: 'Usage: /dominion set_enter_msg <msg> [dominion name]'
SetLeaveMessageUsage: 'Usage: /dominion set_leave_msg <msg> [dominion name]'
SetTpLocationUsage: 'Usage: /dominion set_tp_location [dominion name]'
RenameDominionUsage: 'Usage: /dominion rename <old name> <new name>'
GiveDominionUsage: 'Usage: /dominion give <dominion name> <player name>'
TpDominionUsage: 'Usage: /dominion tp <dominion name>'
DominionNotExist: Dominion does not exist.
SetMapColorUsage: 'Usage: /dominion set_map_color <hex color> [dominion name]'
Group:
CreateGroupUsage: 'Usage: /dominion group create <dominion name> <group name>'
DeleteGroupUsage: 'Usage: /dominion group delete <dominion name> <group name>'
RenameGroupUsage: 'Usage: /dominion group rename <dominion name> <old name> <new name>'
SetGroupFlagUsage: 'Usage: /dominion group set_flag <dominion name> <group name> <flag name> <true|false>'
AddGroupMemberUsage: 'Usage: /dominion group add_member <dominion name> <group name> <player name>'
RemoveGroupMemberUsage: 'Usage: /dominion group remove_member <dominion name> <group name> <player name>'
GroupUsage: 'Usage: /dominion group <create|delete|rename|set_flag|add_member|remove_member|select_member|setting|list>'
NewGroupName: New group name
Member:
DominionAddMemberUsage: 'Usage: /dominion member add <dominion name> <player name>'
DominionSetFlagUsage: 'Usage: /dominion member set_flag <dominion name> <player name> <flag name> <true/false>'
DominionRemoveMemberUsage: 'Usage: /dominion member remove <dominion name> <player name>'
DominionApplyTemplateUsage: 'Usage: /dominion member apply_template <dominion name> <player name> <template name>'
MemberUsage: 'Usage: /dominion member <add/set_flag/remove/apply_template/list/setting/select_player/select_template>'
PageOptional: Page (optional)
ArgumentsNotEnough: Insufficient parameters.
UnknownArgument: Unknown argument.
SizeInteger: Size (integer)
DominionName: Dominion Name
SubDominionName: Sub-dominion Name
EnterMessageContent: Enter Message
LeaveMessageContent: Leave Message
InputColor: Color (HEX)
NewDominionName: New Dominion Name
Residence:
MigrationDisabled: Migration from residence has been disabled by operator.
MigrateUsage: 'Usage: /dominion migrate <res territory name>'
NoMigrationData: You have no data to migrate.
NoResidenceDominion: Specified res territory not found.
ResidenceNotOwner: You are not the owner of this res territory, cannot migrate it.
MigrateFailed: 'Migration failed: %s.'
MigrateSuccess: Territory %s has been migrated from Residence to Dominion.
Operator:
ReloadingDominionCache: Reloading cache from the database...
ReloadedDominionCache: Cache has been reloaded.
ReloadingPrivilegeCache: Reloading player permission cache from the database...
ReloadedPrivilegeCache: Player permission cache has been reloaded.
ReloadingGroupCache: Reloading group cache from the database...
ReloadedGroupCache: Group cache has been reloaded.
ExportingMCAList: Exporting the list of MCA files containing dominions...
CreateExportFolderFailed: Failed to create export folder.
ExportingMCAListForWorld: Exporting the list of MCA files for %s...
DeleteMCAListFailed: Failed to delete the MCA file list for %s.
CreateMCAListFailed: Failed to create the MCA file list for %s.
WriteMCAListFailed: Failed to write to %s.
ExportMCAListFailed: Failed to export the MCA file list for %s.
ExportedMCAList: MCA file list has been exported to %s.
ReloadingConfig: Reloading configuration file...
ReloadedConfig: Configuration file has been reloaded.
Template:
CreateTemplateUsage: 'Usage: /dominion template create <template name>'
DeleteTemplateUsage: 'Usage: /dominion template delete <template name>'
SetTemplateFlagUsage: 'Usage: /dominion template set_flag <template name> <flag name> <true/false>'
TemplateUsage: 'Usage: /dominion template <list|setting|delete|create|set_flag>'
NewTemplateName: New template name
Title:
UseTitleUsage: 'Usage: /dominion use_title <group id>'
RemoveTitleSuccess: Successfully removed title.
GroupNotExist: Group does not exist.
GroupDominionNotExist: Group %s does not belong to any dominion.
NotDominionMember: You are not a member of dominion %s and cannot use its title.
NotGroupMember: You are not a member of group %s and cannot use its title.
UseTitleSuccess: Successfully used group title %s.
UseTitleFailed: 'Using title failed: %s.'
Messages:
OpBypassTpLimit: You are OP, you will bypass territory teleportation limits
WorldNotExist: The world where the dominion is located does not exist
NoTpLocation: Dominion %s does not have a teleport point set, attempting to teleport to the center point
TpLocationNotInside: The teleport point for dominion %s is not inside the dominion, attempting to teleport to the center point
TpToDominion: You have been teleported to %s
TpDisabled: Administrator has disabled teleportation to dominions
DominionNoTp: Teleportation is prohibited in this dominion
GroupNoTp: Your group is not allowed to teleport to this dominion
PrivilegeNoTp: You are not allowed to teleport to this dominion
TpCoolDown: Please wait %d seconds before teleporting again
TpDelay: Teleportation will occur in %d seconds
TpCountDown: Teleport countdown %d seconds
TpFailed: Teleportation failed, please try again
CreateDominionFailed: Failed to create dominion
CreateDominionSuccess: Successfully created dominion %s
DominionNameShouldNotEmpty: Dominion name cannot be empty
DominionNameInvalid: Dominion name cannot contain spaces or periods
DominionNameExist: A dominion with the name %s already exists
SelectPointsWorldNotSame: The two selected worlds are inconsistent
CreateDominionDisabledWorld: Creating dominion is prohibited in world %s
DominionAmountLimit: You have reached the limit of dominions (%d)
ParentDominionNotExist: Parent dominion %s does not exist
RootDominionLost: Root dominion lost!
NotParentDominionOwner: You are not the owner of parent dominion %s, cannot create sub-dominion
ParentDominionNotInSameWorld: Parent dominion and sub-dominion are not in the same world
OutOfParentDominionRange: Out of bounds of parent dominion %s
ConflictWithSpawnProtect: Conflict with spawn protection
ConflictWithDominion: Conflict with dominion %s
DatabaseError: Database error, please contact the administrator
CannotGetDominionAuto: Cannot get the dominion you are in, please specify the name
ExpandDominionFailed: Failed to expand dominion
DominionWorldLost: The world where the dominion is located is missing
ParentDominionLost: Parent dominion lost
ExpandDominionSuccess: Successfully expanded dominion %s by %d blocks
ContractDominionFailed: Failed to contract dominion
ContractDominionConflict: The contracted dominion cannot contain the sub-dominion %s
ContractDominionSuccess: Successfully contracted dominion %s by %d blocks
DeleteDominionFailed: Failed to delete dominion
DeleteDominionSuccess: Dominion %s and all its sub-dominions have been deleted
DeleteDominionConfirm: Deleting dominion %s will also delete all its sub-dominions, do you wish to proceed?
DeleteDominionForceConfirm: Type /dominion delete %s force to confirm deletion
SetEnterMessageSuccess: Successfully set the enter message for dominion %s
SetLeaveMessageSuccess: Successfully set the leave message for dominion %s
SetTpLocationFailed: Failed to set teleport point for dominion
DominionNotExist: Dominion %s does not exist
DominionWorldNotExist: The world where the dominion is located does not exist
SetTpLocationSuccess: Successfully set teleport point for dominion %s at %d %d %d
TpLocationNotInDominion: Teleport point is not within dominion %s
RenameDominionFailed: Failed to rename dominion
RenameDominionSameName: The new name is the same as the old name
RenameDominionSuccess: Successfully renamed dominion %s to %s
GiveDominionFailed: Failed to give dominion
PlayerNotExist: Player %s does not exist or has not logged in
DominionAlreadyBelong: Dominion %s already belongs to %s, no need to transfer
SubDominionCannotGive: Sub-dominions cannot be transferred, you can allow %s to manage the dominion %s by setting them as an admin
GiveDominionConfirm: Transferring dominion %s to %s will also transfer all its sub-dominions, do you wish to proceed?
GiveDominionForceConfirm: Type /dominion give %s %s force to confirm transfer
GiveDominionSuccess: Successfully transferred dominion %s and all its sub-dominions to %s
SetMapColorFailed: Failed to set dominion map color
MapColorInvalid: Color format is invalid
SetMapColorSuccess: Successfully set satellite map color for dominion %s to %s
SizeInvalid: Size is invalid
SizeShouldBeGreaterThan4: The length of any side of the dominion cannot be less than 4
SizeXShouldBeLessThan: The length of the dominion in the X direction (East-West) cannot exceed %d
SizeYShouldBeLessThan: The height of the dominion in the Y direction (Up-Down) cannot exceed %d
SizeZShouldBeLessThan: The length of the dominion in the Z direction (North-South) cannot exceed %d
MaxYShouldBeLessThan: The upper limit of the dominion's Y coordinate cannot exceed %d
MinYShouldBeLessThan: The lower limit of the dominion's Y coordinate cannot exceed %d
DepthInvalid: Sub-dominion depth is invalid
CreateSubDominionDisabled: Creating sub-dominions is not allowed
DepthShouldBeLessThan: The nesting depth of sub-dominions cannot exceed %d
NotDominionOwner: You are not the owner of dominion %s
NoEconomyPlugin: No available economy plugin system, please contact the server owner
OpBypassEconomyCheck: You are OP, the economy check has been skipped
NotEnoughMoney: Your balance is insufficient, need %.2f %s
ChargeMoney: Deducted %.2f %s
RefundMoney: Refunded %.2f %s
CannotGetLocation: Cannot get your location
CrossWorldOperationDisallowed: Cross-world operations are disallowed
NotInDominion: You are not in dominion %s, cannot perform this operation
CannotGetDirection: Cannot get your direction
InvalidDirection: Invalid direction %s
ContractSizeInvalid: The size after contraction is invalid
SubDominionList: '(Sub-dominions: %s)'
SetDominionFlagSuccess: Successfully set dominion permission %s to %s
UnknownFlag: Unknown permission %s
PageNoPermission: You do not have permission to access this page
CreateGroupFailed: Failed to create group %s
CreateGroupSuccess: Successfully created group %s
GroupNameInvalid: Group name cannot contain spaces
GroupNameExist: Dominion %s already has a group named %s
DeleteGroupFailed: Failed to delete group %s
DeleteGroupSuccess: Successfully deleted group %s
GroupNotExist: Dominion %s does not have a group named %s
SetGroupFlagFailed: Failed to set permission %s for group %s to %s
SetGroupFlagSuccess: Successfully set the permissions %s for the permission group %s to %s
NotDominionOwnerForGroup: You are not the owner of the territory %s and cannot modify the admin permission group permissions
RenameGroupFailed: Failed to rename permission group %s to %s
RenameGroupSuccess: Successfully renamed permission group %s to %s
AddGroupMemberFailed: Failed to add member %s to permission group %s
AddGroupMemberSuccess: Successfully added member %s to permission group %s
NoPermissionForGroupMember: You do not have permission to modify the members of the permission group %s in the territory %s
NotDominionOwnerForGroupMember: You are not the owner of the territory %s and cannot add members to the admin permission group
PlayerNotDominionMember: Player %s is not a member of territory %s and cannot directly join the permission group
PlayerAlreadyInGroup: Player %s is already in permission group %s
PlayerIsOwnerForGroupMember: '%s is an admin; you are not the owner of territory %s and cannot add an admin to the permission group'
RemoveGroupMemberFailed: Failed to remove member %s from permission group %s
RemoveGroupMemberSuccess: Successfully removed member %s from permission group %s
NoPermissionForRemoveGroupMember: You do not have permission to remove members of the permission group %s in territory %s
NotDominionOwnerForRemoveGroupMember: You are not the owner of the territory %s and cannot remove members from the admin permission group
PlayerNotMember: Player %s is not a member of territory %s
PlayerNotInGroup: Player %s is not in permission group %s
RemoveMemberFailed: Failed to remove player %s from territory %s
RemoveMemberSuccess: Successfully removed player %s from territory %s
SetMemberFlagFailed: Failed to set player %s's permissions %s in territory %s to %s
SetMemberFlagSuccess: Successfully set player %s's permissions %s in territory %s to %s
PlayerBelongToGroup: Player %s belongs to permission group %s and cannot set permissions separately
AddMemberFailed: Failed to add player %s to the territory member %s
AddMemberSuccess: Successfully added player %s to the territory member %s
PlayerAlreadyMember: Player %s is already a member of territory %s
ApplyTemplateSuccess: Successfully applied template %s to player %s's permissions in territory %s
ApplyTemplateFailed: Failed to apply template %s to player %s's permissions in territory %s
TemplateNotExist: Template %s does not exist
NotDominionOwnerForRemoveAdmin: You are not the owner of the territory %s and cannot remove a territory admin
NotDominionOwnerForSetAdmin: You are not the owner of the territory %s and cannot modify other players' admin permissions
OwnerCannotBeMember: Player %s is the owner of territory %s and cannot be added as a member
CreateTemplateSuccess: Successfully created template %s
CreateTemplateFailed: Failed to create template %s
TemplateNameInvalid: Template name cannot contain spaces
TemplateNameExist: A permission template named %s already exists
DeleteTemplateSuccess: Successfully deleted template %s
DeleteTemplateFailed: Failed to delete template %s
SetTemplateFlagSuccess: Successfully set the permissions %s for the template %s to %s
SetTemplateFlagFailed: Failed to set the permissions %s for the template %s to %s
CommandPlayerOnly: This command can only be executed by players
NoPermission: You do not have %s permission to execute this command
NotDominionOwnerOrAdmin: You are not the owner or admin of territory %s and have no right to modify permissions
InSubDominion: You are currently in a sub-territory, please specify the name of the territory to operate on
NoPermissionForFlag: You do not have %s (%s) permission
BlueMapConnectFailed: Unable to connect to BlueMap plugin. If you do not intend to use satellite map rendering, please go to the configuration file to disable this feature to avoid errors below
DynmapRegisterSuccess: Dynmap registered successfully
DynmapConnectFailed: Unable to connect to Dynmap. If you do not intend to use satellite map rendering, please go to the configuration file to disable this feature
PlaceholderAPINotFound: PlaceholderAPI plugin not found, unable to use permission group title feature, automatically turned off
PluginEnabled: The territory plugin has been started
PluginVersion: 'Version: %s'
PlaceholderAPIRegisterSuccess: Successfully registered PlaceholderAPI extension
LoadedGroupAmount: Loaded a total of %d territory groups
AutoCleanStart: Started automatic cleanup of long-inactive player territory data
AutoCleanPlayer: Cleaned up territory data of player %s
AutoCleanEnd: Automatic cleanup completed
MapInfoDetail: '<div>%s</div><div>Everyone: %s</div>'
TUI:
NotDominionOwnerOrAdminForPage: You are not the owner or admin of %s and have no access to this page
CommandHelp:
Title: Commands Help List
SubTitle: <> is necessary, [] is optional
Navigation:
Menu: MAIN
DominionList: DOMS
Manage: MANAGE
EnvSetting: ENV
GuestSetting: GUEST
MemberList: MEMBERS
MemberSetting: MEMBER
GroupList: GROUPS
GroupSetting: GROUP
AllDominion: ALL_DOMS
TemplateList: TEMPLATES
TemplateSetting: TEMPLATE
MigrateList: RES_DATA
TitleList: TITLES
ManageButton: MANAGE
DeleteButton: DELETE
SearchButton: SEARCH
BackButton: BACK
SelectButton: SELECT
EditButton: EDIT
Menu:
Title: Dominion Main Menu
CreateDominionButton: CREATE
CreateDominionDescription: Create a dominion automatically around you.
MyDominionButton: DOMINIONS
MyDominionDescription: List all your dominions.
TitleListButton: TITLES
TitleListDescription: List/Use group titles.
TemplateListButton: TEMPLATES
TemplateListDescription: Permission template list.
CommandHelpButton: HELP
CommandHelpDescription: View command list.
DocumentButton: DOCS
DocumentDescription: Open usage documentation in the browser.
MigrateButton: MIGRATE
MigrateDescription: Migrate your territories from Residence.
AllDominionButton: ALL_DOMS
AllDominionDescription: List all dominions of server.
ReloadCacheButton: RELOAD_CACHE
ReloadCacheDescription: Could solve some weird problem. DONT DO THIS FREQUENTLY!
ReloadConfigButton: RELOAD_CONF
ReloadConfigDescription: Reload configuration file from disk.
OpOnlySection: '--- FOLLOWING VISIBLE OP ONLY ---'
DominionList:
Title: My Dominion List
AdminSection: '--- YOU ARE ADMIN OF FOLLOWING ---'
DominionManage:
Title: '%s Management'
InfoButton: DETAILS
InfoDescription: View details of this dominion.
EnvSettingButton: ENV_SETTING
EnvSettingDescription: Set some environmental behaviors.
GuestSettingButton: GUEST_SETTING
GuestSettingDescription: Configure guest permissions.
MemberListButton: MEMBERS
MemberListDescription: Manage the permissions of members.
GroupListButton: GROUPS
GroupListDescription: Manage the permission groups.
SetTpLocationButton: SET_TP_LOC
SetTpLocationDescription: Set the teleport point.
RenameButton: RENAME
RenameDescription: Rename the dominion.
EditJoinMessageButton: EDIT_ENTER_MSG
EditJoinMessageDescription: Message displayed when enter.
EditLeaveMessageButton: EDIT_LEAVE_MSG
EditLeaveMessageDescription: Message displayed when leave.
SetMapColorButton: COLOR
SetMapColorDescription: Color will be shown on web map.
NotInDominion: You are not in any dominion, please specify the dominion name /dominion manage <dominion name>
EnvSetting:
Title: '%s Environmental Settings'
Usage: 'Usage: /dominion env_setting <dominion name> [page]'
GuestSetting:
Title: '%s Guest Settings'
Usage: 'Usage: /dominion guest_setting <dominion name> [page]'
SizeInfo:
Title: '%s Size Information'
Owner: 'Owner:'
Size: 'Size:'
Center: 'Center Coordinates:'
Vertical: 'Vertical Height:'
VertY: 'Y-axis Coordinates:'
Square: 'Square:'
Volume: 'Volume:'
TpLocation: 'Teleport Coordinates:'
NoneTp: None Tp Info
Usage: You are not in any dominion, please specify the dominion name /dominion info <dominion name>
MemberList:
Title: '%s Member List'
AddButton: ADD_MEMBER
FlagButton: PERMS
FlagDescription: Configure member permissions.
RemoveButton: REMOVE
RemoveDescription: Remove this member (to guest).
NoPermissionSet: Only owner can set admin permissions.
NoPermissionRemove: Only owner can remove admin permissions.
BelongToGroup: This member belongs to group %s and cannot set permissions separately.
Usage: 'Usage: /dominion member list <dominion name> [page]'
AdminTag: This member is an ADMIN.
NormalTag: This is a regular MEMBER.
BlacklistTag: This is a BLACKLIST member.
GroupTag: This member is in a GROUP.
MemberSetting:
Title: '%s Permission in %s'
ApplyTemplateButton: APPLY_TEMPLATE
ApplyTemplateDescription: Choose a template to apply.
Usage: 'Usage: /dominion member setting <dominion name> <player name> [page]'
SelectPlayer:
Title: Select Player to Add as Member
Description: You can only select players who have logged before.
Usage: 'Usage: /dominion member select_player <dominion name> [page]'
SelectTemplate:
Title: Select a Template
Description: Apply to %s in %s.
Usage: 'Usage: /dominion member select_template <dominion name> <player name> [page]'
GroupList:
Title: '%s Group List'
CreateButton: CREATE_GROUP
CreateDescription: Create a new group.
DeleteDescription: Delete group %s.
EditDescription: Edit group %s.
AddMemberDescription: Add member to group %s.
RemoveMemberDescription: Remove %s from group %s.
Usage: 'Usage: /dominion group list <dominion name> [page]'
GroupSetting:
RenameButton: RENAME_GROUP
Usage: 'Usage: /dominion group setting <dominion name> <group name> [page]'
TitleL: 'Group '
TitleR: ' Management'
RenameDescription: Rename group %s.
SelectMember:
Title: Select Member
Description: Select a member to add to group %s.
Usage: 'Usage: /dominion group select_member <dominion name> <group name> [cb page] [page]'
TemplateList:
Title: Permission Template List
CreateButton: CREATE_TEMPLATE
CreateDescription: Create a new permission template.
TemplateSetting:
Title: Template %s Management
Migrate:
Title: Migration from Residence
NoData: You do not have any data to migrate.
Button: MIGRATE
SubDominion: Sub-territories cannot be migrated manually, they will migrate automatically with the parent territory.
TitleList:
Title: My Group Titles
RemoveButton: UNSET
ApplyButton: USE
FromDominion: 'From Dominion:'
CUI:
Input:
CreateDominion: Type New Dominion Name
CreateGroup: Type New Group Name
CreateTemplate: Type New Template Name
EditEnterMessage: Edit Enter Message
EditLeaveMessage: Edit Leave Message
AddMember: Type Player Name to Add Member
RenameDominion: Rename Dominion
RenameGroup: Rename Group
SetMapColor: Type HEX Color
Config:
Check:
AutoCreateRadiusError: AutoCreateRadius cannot be 0, reset to 10
AutoCleanAfterDaysError: AutoCleanAfterDays cannot be 0, reset to 180
ToolNameError: Tool name setting error, reset to ARROW
LimitSizeXError: Limit.SizeX dimension cannot be less than 4, reset to 128
LimitSizeYError: Limit.SizeY dimension cannot be less than 4, reset to 64
LimitSizeZError: Limit.SizeZ dimension cannot be less than 4, reset to 128
LimitMinYError: Limit.MinY cannot be greater than or equal to Limit.MaxY, reset to -64 320
RefundError: Economy.Refund setting is illegal, reset to 0.85
PriceError: Economy.Price setting is illegal, reset to 10.0
LimitSizeYAutoAdjust: When Limit.Vert is enabled, Limit.SizeY cannot be less than Limit.MaxY - Limit.MinY, automatically adjusted to %d
AmountError: Limit.Amount setting is illegal, reset to 10
DepthError: Limit.Depth setting is illegal, reset to 3
GroupMinYError: Permission group %s's MinY cannot be greater than or equal to MaxY, reset to -64 and 320
GroupSizeXError: Permission group %s's SizeX is set too small, reset to 128
GroupSizeYError: Permission group %s's SizeY is set too small, reset to 64
GroupSizeZError: Permission group %s's SizeZ is set too small, reset to 128
GroupAmountError: Permission group %s's Amount setting is illegal, reset to 10
GroupDepthError: Permission group %s's Depth setting is illegal, reset to 3
GroupPriceError: Permission group %s's Price setting is illegal, reset to 10.0
GroupRefundError: Permission group %s's Refund setting is illegal, reset to 0.85
LoadFlagError: 'Failed to read permission configuration: %s'
TpDelayError: Teleport delay cannot be less than 0, reset to 0
TpCoolDownError: Teleport cooldown cannot be less than 0, reset to 0
Comment:
Language: Language settings, refer to the file names in the languages folder
AutoCreateRadius: Automatically created territory radius, in blocks
NegativeOneDisabled: '-1 means disabled'
DefaultLimit: Default player territory limit
SpawnProtectRadius: Spawn point protection radius. Territory cannot be claimed in this area around the spawn point
MinY: Minimum Y coordinate
MaxY: Maximum Y coordinate
NegativeOneUnlimited: '-1 means no limit'
SizeX: Maximum length in the X direction
SizeY: Maximum length in the Y direction
SizeZ: Maximum length in the Z direction
Amount: Maximum number of territories
Depth: Sub-territory depth
ZeroDisabled: 0 means disabled
Vert: Whether to automatically extend to MaxY and MinY
OpBypass: Whether to allow OP to ignore territory restrictions
TpDelay: Teleport delay seconds
TpCoolDown: Teleport cool down seconds
AutoCleanAfterDays: Automatically clean up territories of players who haven't logged in for a long time (days)
ToolName: Territory tool name
Economy: Economy settings
VaultRequired: Vault plugin and its dependencies must be installed
Price: Territory price per block
OnlyXZ: Whether to only calculate the xz plane area
Refund: Refund ratio when deleting or shrinking territory
FlyPermission: Flight permission node - players who possess any of the following permission nodes will not be intercepted from flying by this plugin
ResidenceMigration: Whether players are allowed to migrate territory data from Residence
GroupTitle: Permission group title - use permission group as a title (PlaceholderAPI plugin required)
GroupTitleVariable: 'Variable: %dominion_group_title%'
GroupTitleColor: 'If you want to add color to prefixes or suffixes, please use this format &#ffffff'
PerformanceTimer: Performance testing timer
GroupLine1: '>---------------------------------<'
GroupLine2: '| Special permission group configuration for territory restrictions |'
GroupLine3: '>---------------------------------<'
GroupLine4: This file can be used as a template, you can copy this file and rename it to what you want
GroupLine5: Permission group name, then modify the configuration inside if you want to give sponsors (or VIPs)
GroupLine6: 'Some special offers, such as lower territory prices or larger territories, can be configured here. For detailed instructions, refer to the following link:'
GroupLine7: 'Configuration here. Detailed instructions can be found at the following link:'
GroupLine8DocumentAddress: '> https://dominion.lunadeer.cn/%s/operator/privilege.html'
WorldSettings: Set the land rules for a specific world separately (if not set, the above rules will be used)
Flags:
admin:
DisplayName: Admin
Description: Manage permissions of other members within the territory
anchor:
DisplayName: Spawn Anchor
Description: Whether to allow setting/using spawn anchors
animal_killing:
DisplayName: Inflict damage to animals
Description: Whether to allow inflicting damage to animals
animal_spawn:
DisplayName: Animal spawn (breeding)
Description: Whether to allow animal spawning (including breeding)
animal_move:
DisplayName: Animal movement
Description: Whether animals can move in (to) the territory
anvil:
DisplayName: Use Anvil
Description: Whether to allow using the anvil
beacon:
DisplayName: Beacon interaction
Description: Whether to allow interaction with beacons
bed:
DisplayName: Bed interaction
Description: Whether to allow sleeping in beds or setting spawn points
brew:
DisplayName: Use Brewing Stand
Description: Whether to allow using brewing stands
break:
DisplayName: Break Blocks
Description: 'Whether blocks can be destroyed (including: general blocks, display frames, armor stands)'
button:
DisplayName: Use Buttons
Description: Whether to allow using buttons of various materials
cake:
DisplayName: Eat Cake
Description: Whether to allow eating cake
container:
DisplayName: General Containers
Description: 'Includes: chests/barrels/shulker boxes/armor stands/display cases'
craft:
DisplayName: Use Crafting Table
Description: Whether to allow using crafting tables
crafter:
DisplayName: Crafting Table
Description: Whether to allow modifying automatic crafting tables
creeper_explode:
DisplayName: Mob destruction/non-TNT explosion
Description: 'Includes: creepers/nether stars/ender crystals/fire balls/beds/spawn anchors explosion etc.'
comparer:
DisplayName: Comparator Interaction
Description: Whether to allow modifying comparator states
door:
DisplayName: Door Interaction
Description: Whether to use various materials for doors (including trapdoors)
dragon_break_block:
DisplayName: Ender Dragon Break Blocks
Description: Whether the ender dragon's collision can break blocks
dragon_egg:
DisplayName: Touch Dragon Egg
Description: Whether to allow touching dragon eggs
dye:
DisplayName: Dyeing
Description: Whether dye can be used (to dye sheep, dog collars, cat collars)
edit_sign:
DisplayName: Edit Sign
Description: Whether to allow editing signs
egg:
DisplayName: Throw Eggs
Description: Whether to allow throwing eggs
enchant:
DisplayName: Use Enchanting Table
Description: Whether to allow using enchanting tables
ender_man:
DisplayName: Enderman Behavior
Description: 'Includes: whether endermen can spawn and teleport'
ender_pearl:
DisplayName: Throw Ender Pearls
Description: Whether to allow using ender pearls
feed:
DisplayName: Feed Animals
Description: Whether to allow feeding animals
fire_spread:
DisplayName: Fire Spread
Description: Whether fire can spread
flow_in_protection:
DisplayName: Whether external fluids can enter
Description: 'Includes: lava, water (will not prevent fluid spread within the territory)'
fly:
DisplayName: Flying
Description: This is not elytra flight, it is akin to flying in creative mode
glow:
DisplayName: Player Glow
Description: Similar glowing effect to spectral arrows
harvest:
DisplayName: Harvest
Description: Harvest crops and plants
honey:
DisplayName: Honeycomb Interaction
Description: Whether to allow collecting honey
hook:
DisplayName: Use Fishing Rod
Description: Whether to allow using fishing rods
hopper:
DisplayName: Special Containers
Description: 'Includes: hoppers/furnaces/dispensers/dropper/smelters/smoker'
hopper_outside:
DisplayName: Whether territory outside hoppers affect chests within the territory
Description: Whether hoppers outside the territory can affect chests inside the territory
ignite:
DisplayName: Ignite
Description: Whether to allow igniting with flint and steel
item_frame_interactive:
DisplayName: Item Frame Interaction
Description: Whether items can interact with item frames (rotate items in item frames)
item_frame_proj_damage:
DisplayName: Whether throwable entities can break item frames/pictures
Description: Whether non-player thrown items can break item frames/pictures and other hanging objects
lever:
DisplayName: Use Lever
Description: Whether to allow using levers
mob_drop_item:
DisplayName: Mob Drop Item
Description: Whether mobs drop items when they die
monster_killing:
DisplayName: Inflict damage to monsters
Description: Whether players can inflict damage to monsters
monster_spawn:
DisplayName: Monster Spawn
Description: Whether monsters can spawn
monster_move:
DisplayName: Monster Movement
Description: Whether monsters can move in (to) the territory
move:
DisplayName: Move
Description: Whether to allow moving
note_block:
DisplayName: Click Note Block
Description: Redstone music or some redstone machines may use this...
place:
DisplayName: Place Blocks
Description: 'Whether blocks can be placed (including: general blocks, display frames, lava, water)'
piston_outside:
DisplayName: Whether pistons can push blocks across territory
Description: Whether pistons can push things into the territory or push things out of the territory
pressure:
DisplayName: Pressure Plate Interaction
Description: Whether to trigger pressure plates of various materials
riding:
DisplayName: Ride Vehicles
Description: Whether to allow riding various vehicles
repeater:
DisplayName: Repeater Interaction
Description: Whether to allow interaction with repeaters
shear:
DisplayName: Shear Wool
Description: Whether to allow shearing wool
shoot:
DisplayName: Throwing Weapons
Description: 'Includes: archery/snowballs/tridents/blast materials'
show_border:
DisplayName: Show Territory Border
Description: Whether to display the territory border
teleport:
DisplayName: Territory Teleport
Description: Whether to enable territory teleport
tnt_explode:
DisplayName: TNT Explosion
Description: Whether TNT can explode
trade:
DisplayName: Villager Trading
Description: Whether to allow trading with villagers
trample:
DisplayName: Crop Trampling
Description: Whether crops can be trampled (turning off means protecting tillage)
trig_pressure_proj:
DisplayName: Throwable triggers pressure plates
Description: Whether thrown items (arrows/fireballs/snowballs) can trigger pressure plates
trig_pressure_mob:
DisplayName: Mob triggers pressure plates
Description: Whether mobs (excluding players) can trigger pressure plates
trig_pressure_drop:
DisplayName: Dropped Items trigger pressure plates
Description: Whether dropped items can trigger pressure plates
vehicle_destroy:
DisplayName: Destroy Vehicles
Description: Whether vehicles (mainly minecarts) can be destroyed
vehicle_spawn:
DisplayName: Spawn Vehicles
Description: Whether vehicles (mainly minecarts) can spawn
villager_killing:
DisplayName: Inflict damage to villagers
Description: Whether players can inflict damage to villagers
villager_spawn:
DisplayName: Villager Breeding
Description: Whether villagers can breed (including villager eggs)
wither_spawn:
DisplayName: Wither Spawn
Description: Wither spawn and the explosion caused by wither spawn
Localization:
LoadLanguageSuccess: Successfully loaded language file en-us
LoadLanguageFailed: 'Failed to load language file: %s'
LanguageFileNotFound: Language file %s not found, using default zh-cn.
Utils:
TeleportUnsafe: The teleport destination is unsafe, teleportation cancelled.
CheckingUpdate: Checking for updates...
NewVersion: 'New version found: %s'
VersionInfo: 'Version information:'
DownloadPage: 'Download page: %s'
CurrentVersion: 'You are currently on the latest version: %s'
GetUpdateFailed: 'Failed to get updates: %s'
NewVersionConsole: 'New version found: %s . Check the console for details or click the link below'
VaultNotAvailable: Vault not available.
VaultUnlockedNotAvailable: VaultUnlocked not available.
NoEconomyPlugin: No available economy plugin.
TUI:
Navigation: NAV
NoContent: Uh oh, theres no content here
PageError: PAGE ERROR
Add: ADD
Sub: SUB
PreviousPage: '<'
NextPage: '>'
PageL: 'Page '
PageR: ' '
CUI:
Input: Please Type Below
InputBox: Text here...
NotAvailable: CUI TextInput functionality is not available on non-Paper servers, please use commands to perform operations.
SuggestCommand: 'Suggestion: %s'
LeftRightClick: 'L-Click: Confirm, R-Click: Cancel'
NoSpace: No spaces allowed.
Database:
Connecting: Connecting to %s database...
UnsupportedType: 'Unsupported database type: '
ConnectionFailed: 'Database connection failed: '
ConnectionSuccess: Database connection successful!
Reconnecting: Trying to reconnect to the database...
ReconnectionSuccess: Database reconnection successful!
ReconnectionFailed: Database reconnection failed!
ErrorTitle: '=== CRITICAL DATABASE ERROR ==='
ReconnectionUnexpected: Database connection unexpectedly closed, trying to reconnect...
OperationAbort: Operation aborted!
OperationFailed: 'Database operation failed: '
Closing: Closing database connection...
Closed: Database connection closed.
CloseFailed: 'Failed to close database connection: '
CheckColumnFailed: Failed to check if column exists.
CheckTableFailed: Failed to check if table exists.

726
languages/ja-jp.yml Normal file
View File

@ -0,0 +1,726 @@
# Help us to translate this file into your language.
# Guide: https://github.com/ColdeZhang/Dominion/blob/master/CONTRIBUTING.md#translate-plugin-messages-
# Don't forget to leave your name here, so that we can give you credit for your translation.
# Translated by: YOUR_NAME_HERE
Commands:
Dominion:
SetFlagUsage: '使い方: /dominion set <権限名> <true/false> [領地名]'
CreateDominionUsage: '使い方: /dominion create <領地名>'
CreateSelectPointsFirst: 最初にツールを使用して領地の対角線の2点を選択してください。または、/dominion auto_create <領地名> を使用して自動領地を作成します。
CreateSubDominionUsage: '使い方: /dominion create_sub <子領地名> [親領地名]'
CreateSubSelectPointsFirst: 最初にツールを使用して子領地の対角線の2点を選択してください。または、/dominion auto_create_sub <子領地名> [親領地名] を使用して自動子領地を作成します。
AutoCreateDominionUsage: '使い方: /dominion auto_create <領地名>'
AutoCreateSubDominionUsage: '使い方: /dominion auto_create_sub <子領地名> [親領地名]'
AutoCreateDominionDisabled: 自動領地作成機能は無効になっています
ExpandDominionUsage: '使い方: /dominion expand [サイズ] [領地名]'
ContractDominionUsage: '使い方: /dominion contract [サイズ] [領地名]'
SizeShouldBeInteger: サイズは整数である必要があります
SizeShouldBePositive: サイズは0より大きい必要があります
DeleteDominionUsage: '使い方: /dominion delete <領地名>'
SetEnterMessageUsage: '使い方: /dominion set_enter_msg <説明文> [領地名]'
SetLeaveMessageUsage: '使い方: /dominion set_leave_msg <説明文> [領地名]'
SetTpLocationUsage: '使い方: /dominion set_tp_location [領地名]'
RenameDominionUsage: '使い方: /dominion rename <元領地名> <新領地名>'
GiveDominionUsage: '使い方: /dominion give <領地名> <プレイヤー名>'
TpDominionUsage: '使い方: /dominion tp <領地名>'
DominionNotExist: 領地は存在しません
SetMapColorUsage: '使い方: /dominion set_map_color <色> [領地名]'
Group:
CreateGroupUsage: '使い方: /dominion group create <領地名> <権限グループ名>'
DeleteGroupUsage: '使い方: /dominion group delete <領地名> <権限グループ名>'
RenameGroupUsage: '使い方: /dominion group rename <領地名> <権限グループ古い名前> <新しい名前>'
SetGroupFlagUsage: '使い方: /dominion group set_flag <領地名> <権限グループ名> <権限名> <true|false>'
AddGroupMemberUsage: '使い方: /dominion group add_member <領地名> <権限グループ名> <プレイヤー名>'
RemoveGroupMemberUsage: '使い方: /dominion group remove_member <領地名> <権限グループ名> <プレイヤー名>'
GroupUsage: '使い方: /dominion group <create|delete|rename|set_flag|add_member|remove_member|select_member|setting|list>'
NewGroupName: 新しい権限グループ名
Member:
DominionAddMemberUsage: '使い方: /dominion member add <領地名> <プレイヤー名>'
DominionSetFlagUsage: '使い方: /dominion member set_flag <領地名> <プレイヤー名> <権限名> <true/false>'
DominionRemoveMemberUsage: '使い方: /dominion member remove <領地名> <プレイヤー名>'
DominionApplyTemplateUsage: '使い方: /dominion member apply_template <領地名> <プレイヤー名> <テンプレート名>'
MemberUsage: '使い方: /dominion member <add/set_flag/remove/apply_template/list/setting/select_player/select_template>'
PageOptional: ページ番号(オプション)
ArgumentsNotEnough: 引数が足りません
UnknownArgument: 不明な引数
SizeInteger: サイズ(整数)
DominionName: 領地名
SubDominionName: 子領地名
EnterMessageContent: 入場メッセージ内容
LeaveMessageContent: 離脱メッセージ内容
InputColor: 色を入力16進数
NewDominionName: 新しい領地名
Residence:
MigrationDisabled: Residence 移行機能は無効にされています
MigrateUsage: '使い方: /dominion migrate <res領地名>'
NoMigrationData: 移行可能なデータがありません
NoResidenceDominion: 指定した Residence 領地が見つかりません
ResidenceNotOwner: あなたはこの領地の所有者ではないので、移行できません
MigrateFailed: '移行に失敗しました: %s'
MigrateSuccess: 領地 %s が Residence から Dominion に移行されました
Operator:
ReloadingDominionCache: データベースから領地キャッシュを再読み込みしています...
ReloadedDominionCache: 領地キャッシュが再読み込みされました
ReloadingPrivilegeCache: データベースからプレイヤー権限キャッシュを再読み込みしています...
ReloadedPrivilegeCache: プレイヤー権限キャッシュが再読み込みされました
ReloadingGroupCache: データベースから権限グループキャッシュを再読み込みしています...
ReloadedGroupCache: 権限グループキャッシュが再読み込みされました
ExportingMCAList: 所有している領地のMCAファイルのリストをエクスポートしています...
CreateExportFolderFailed: エクスポートフォルダの作成に失敗しました
ExportingMCAListForWorld: '%s のMCAファイルリストをエクスポート中...'
DeleteMCAListFailed: '%s のMCAファイルリストの削除に失敗しました'
CreateMCAListFailed: '%s のMCAファイルリストの作成に失敗しました'
WriteMCAListFailed: '%s の書き込みに失敗しました'
ExportMCAListFailed: '%s のMCAファイルリストのエクスポートに失敗しました'
ExportedMCAList: '%s に MCA ファイルのリストがエクスポートされました'
ReloadingConfig: 設定ファイルを再読み込みしています...
ReloadedConfig: 設定ファイルが再読み込みされました
Template:
CreateTemplateUsage: '使い方: /dominion template create <テンプレート名>'
DeleteTemplateUsage: '使い方: /dominion template delete <テンプレート名>'
SetTemplateFlagUsage: '使い方: /dominion template set_flag <テンプレート名> <権限名> <true/false>'
TemplateUsage: '使い方: /dominion template <list|setting|delete|create|set_flag>'
NewTemplateName: 新しいテンプレート名
Title:
UseTitleUsage: '使い方: /dominion use_title <権限グループID>'
RemoveTitleSuccess: 権限グループ称号を正常に解除しました
GroupNotExist: 権限グループが存在しません
GroupDominionNotExist: 権限グループ %s に属する領地が存在しません
NotDominionMember: あなたは領地 %s のメンバーではないため、称号を使用できません
NotGroupMember: あなたは権限グループ %s に属していないため、称号を使用できません
UseTitleSuccess: 権限グループ %s の称号を正常に使用しました
UseTitleFailed: 称号の使用に失敗しました:%s
Messages:
OpBypassTpLimit: あなたはOPですので、領地テレポート制限を無視します
WorldNotExist: 領地が存在しない世界です
NoTpLocation: 領地 %s にテレポートポイントが設定されていないため、中心点へのテレポートを試みます
TpLocationNotInside: 領地 %s のテレポートポイントが領地内にないため、中心点へのテレポートを試みます
TpToDominion: '%s にテレポートしました'
TpDisabled: 管理者が領地テレポート機能を有効にしていません
DominionNoTp: この領地ではテレポートが禁止されています
GroupNoTp: あなたのいる権限グループはこの領地にテレポートすることが許可されていません
PrivilegeNoTp: あなたはこの領地にテレポートすることが許可されていません
TpCoolDown: テレポートは %d 秒後に実行されます
TpDelay: テレポートは %d 秒後に実行されます
TpCountDown: テレポートカウントダウン %d 秒
TpFailed: テレポートに失敗しました。再試行してください
CreateDominionFailed: 領地を作成できませんでした
CreateDominionSuccess: 領地 %s を作成しました
DominionNameShouldNotEmpty: 領地名は空にできません
DominionNameInvalid: 領地名にはスペースやドットを含めることはできません
DominionNameExist: '%s という名前の領地はすでに存在します'
SelectPointsWorldNotSame: 2つの選点の世界が一致していません
CreateDominionDisabledWorld: 世界 %s で領地を作成することは禁止されています
DominionAmountLimit: あなたの領地数が上限に達しました(%d個)
ParentDominionNotExist: 親領地 %s は存在しません
RootDominionLost: ルート領地が失われました!
NotParentDominionOwner: あなたは親領地 %s の所有者ではないため、子領地を作成できません
ParentDominionNotInSameWorld: 親領地と子領地は同じ世界に存在しません
OutOfParentDominionRange: 親領地 %s の範囲を超えています
ConflictWithSpawnProtect: 出生点保護と衝突しています
ConflictWithDominion: 領地 %s と衝突しています
DatabaseError: データベースエラーが発生しました。管理者に連絡してください
CannotGetDominionAuto: 現在いる領地を取得できません。名前を指定してください
ExpandDominionFailed: 領地の拡張に失敗しました
DominionWorldLost: 領地のある世界が失われました
ParentDominionLost: 親領地が失われました
ExpandDominionSuccess: 領地 %s を %dブロック拡張しました
ContractDominionFailed: 領地の縮小に失敗しました
ContractDominionConflict: 縮小後の領地には子領地 %s を含めることができません
ContractDominionSuccess: 領地 %s を %dブロック縮小しました
DeleteDominionFailed: 領地の削除に失敗しました
DeleteDominionSuccess: 領地 %s とそのすべての子領地が削除されました
DeleteDominionConfirm: 領地 %s を削除すると、そのすべての子領地も削除されます。続行しますか?
DeleteDominionForceConfirm: /dominion delete %s force を入力して削除を確認してください
SetEnterMessageSuccess: 領地 %s の入場メッセージを設定しました
SetLeaveMessageSuccess: 領地 %s の離脱メッセージを設定しました
SetTpLocationFailed: 領地のテレポートポイントの設定に失敗しました
DominionNotExist: 領地 %s は存在しません
DominionWorldNotExist: 領地が存在しない世界です
SetTpLocationSuccess: 領地 %s のテレポートポイント %d %d %d を設定しました
TpLocationNotInDominion: テレポートポイントは領地 %s に存在しません
RenameDominionFailed: 領地の名前の変更に失敗しました
RenameDominionSameName: 新しい名前は旧い名前と同じです
RenameDominionSuccess: 領地 %s を %s に名前を変更しました
GiveDominionFailed: 領地の譲渡に失敗しました
PlayerNotExist: プレイヤー %s は存在しないか、ログインしたことがありません
DominionAlreadyBelong: 領地 %s はすでに %s に属しているため、移行する必要はありません
SubDominionCannotGive: 子領地は譲渡できません。管理者として %s を設定することで、この領地 %s を管理することができます
GiveDominionConfirm: 領地 %s を %s に譲渡すると、そのすべての子領地も譲渡されます。続行しますか?
GiveDominionForceConfirm: /dominion give %s %s force を入力して譲渡を確認してください
GiveDominionSuccess: 領地 %s とそのすべての子領地を %s に譲渡しました
SetMapColorFailed: 領地の地図の色の設定に失敗しました
MapColorInvalid: 色の形式が正しくありません
SetMapColorSuccess: 領地 %s の衛星地図の色を %s に設定しました
SizeInvalid: サイズが無効です
SizeShouldBeGreaterThan4: 領地の任意の一辺の長さは4未満にはできません
SizeXShouldBeLessThan: 領地X方向東西の長さは %d を超えることができません
SizeYShouldBeLessThan: 領地Y方向上下の高さは %d を超えることができません
SizeZShouldBeLessThan: 領地Z方向南北の長さは %d を超えることができません
MaxYShouldBeLessThan: 領地のY座標の上限は %d を超えてはいけません
MinYShouldBeLessThan: 領地のY座標の下限は %d を超えてはいけません
DepthInvalid: 子領地の深さが無効です
CreateSubDominionDisabled: 子領地の作成は許可されていません
DepthShouldBeLessThan: 子領地のネストの深さは %d を超えてはいけません
NotDominionOwner: あなたは領地 %s の所有者ではありません
NoEconomyPlugin: 使用可能な経済プラグインシステムがありません。サーバー管理者に連絡してください
OpBypassEconomyCheck: あなたはOPですので、経済チェックをスキップしました
NotEnoughMoney: 残高が不足しています。 %.2f %s が必要です
ChargeMoney: '%.2f %s が差し引かれました'
RefundMoney: '%.2f %s が返金されました'
CannotGetLocation: あなたの位置を取得できません
CrossWorldOperationDisallowed: 世界を超えた操作は禁止されています
NotInDominion: あなたは領地 %s にいないため、この操作を実行できません
CannotGetDirection: あなたの方向を取得できません
InvalidDirection: 無効な方向 %s
ContractSizeInvalid: 縮小後の領地サイズが無効です
SubDominionList: (子領地:%s)
SetDominionFlagSuccess: 領地の権限 %s を %s に設定しました
UnknownFlag: 不明な権限 %s
PageNoPermission: このページにアクセスする権限がありません
CreateGroupFailed: 権限グループ %s の作成に失敗しました
CreateGroupSuccess: 権限グループ %s の作成に成功しました
GroupNameInvalid: 権限グループ名にスペースを含めることはできません
GroupNameExist: 領地 %s にはすでに %s という名前の権限グループが存在します
DeleteGroupFailed: 権限グループ %s の削除に失敗しました
DeleteGroupSuccess: 権限グループ %s の削除に成功しました
GroupNotExist: 領地 %s に %s という名前の権限グループは存在しません
SetGroupFlagFailed: 権限グループ %s の権限 %s を %s に設定するのに失敗しました
SetGroupFlagSuccess: 権限グループ %s の権限 %s を %s に設定しました
NotDominionOwnerForGroup: あなたは領地 %s の所有者ではないため、管理者権限グループの権限を変更できません
RenameGroupFailed: 権限グループ %s を %s にリネームするのに失敗しました
RenameGroupSuccess: 権限グループ %s を %s にリネームしました
AddGroupMemberFailed: メンバー %s を権限グループ %s に追加するのに失敗しました
AddGroupMemberSuccess: メンバー %s を権限グループ %s に追加しました
NoPermissionForGroupMember: 領地 %s の権限グループ %s メンバーを変更する権限がありません
NotDominionOwnerForGroupMember: あなたは領地 %s の所有者ではないため、管理者権限グループにメンバーを追加できません
PlayerNotDominionMember: プレイヤー %s は領地 %s のメンバーではなく、直接権限グループに参加できません
PlayerAlreadyInGroup: プレイヤー %s はすでに権限グループ %s にいます
PlayerIsOwnerForGroupMember: '%s は管理者であり、あなたは領地 %s の所有者ではないため、管理者を権限グループに追加できません'
RemoveGroupMemberFailed: 権限グループ %s からメンバー %s を削除するのに失敗しました
RemoveGroupMemberSuccess: 権限グループ %s からメンバー %s を削除しました
NoPermissionForRemoveGroupMember: 領地 %s の権限グループ %s メンバーを削除する権限がありません
NotDominionOwnerForRemoveGroupMember: あなたは領地 %s の所有者ではないため、管理者権限グループからメンバーを削除できません
PlayerNotMember: プレイヤー %s は領地 %s のメンバーではありません
PlayerNotInGroup: プレイヤー %s は権限グループ %s にいません
RemoveMemberFailed: プレイヤー %s を領地 %s から削除するのに失敗しました
RemoveMemberSuccess: プレイヤー %s を領地 %s から削除しました
SetMemberFlagFailed: プレイヤー %s の領地 %s の権限 %s を %s に設定するのに失敗しました
SetMemberFlagSuccess: プレイヤー %s の領地 %s の権限 %s を %s に設定しました
PlayerBelongToGroup: プレイヤー %s は %s 権限グループに所属しているため、個別に権限を設定できません
AddMemberFailed: プレイヤー %s を領地メンバー %s に追加するのに失敗しました
AddMemberSuccess: プレイヤー %s を領地メンバー %s に追加しました
PlayerAlreadyMember: プレイヤー %s はすでに領地 %s のメンバーです
ApplyTemplateSuccess: テンプレート %s をプレイヤー %s の領地 %s の権限に適用しました
ApplyTemplateFailed: テンプレート %s をプレイヤー %s の領地 %s の権限に適用するのに失敗しました
TemplateNotExist: テンプレート %s は存在しません
NotDominionOwnerForRemoveAdmin: あなたは領地 %s の所有者ではないため、領地管理者を削除できません
NotDominionOwnerForSetAdmin: あなたは領地 %s の所有者ではないため、他のプレイヤーの管理者権限を変更できません
OwnerCannotBeMember: プレイヤー %s は領地 %s の所有者であるため、メンバーとして追加できません
CreateTemplateSuccess: テンプレート %s を作成しました
CreateTemplateFailed: テンプレート %s を作成するのに失敗しました
TemplateNameInvalid: テンプレート名にスペースを含めることはできません
TemplateNameExist: すでに %s という名前の権限テンプレートが存在します
DeleteTemplateSuccess: テンプレート %s を削除しました
DeleteTemplateFailed: テンプレート %s を削除するのに失敗しました
SetTemplateFlagSuccess: テンプレート %s の権限 %s を %s に設定しました
SetTemplateFlagFailed: テンプレート %s の権限 %s を %s に設定するのに失敗しました
CommandPlayerOnly: このコマンドはプレイヤーによってのみ実行できます
NoPermission: あなたには %s 権限がないため、このコマンドを実行できません
NotDominionOwnerOrAdmin: あなたは領地 %s の所有者または管理者ではありません。権限を変更する権限がありません
InSubDominion: あなたは現在子領地の中にいます。操作する領地名を指定してください
NoPermissionForFlag: あなたには %s (%s) 権限がありません
BlueMapConnectFailed: BlueMap プラグインに接続できません。衛星地図レンダリングを使用しない予定の場合は、設定ファイルで機能を無効にすることをお勧めします。
DynmapRegisterSuccess: Dynmap 登録成功
DynmapConnectFailed: Dynmap に接続できませんでした。衛星地図レンダリングを使用しない予定の場合は、設定ファイルで機能を無効にすることをお勧めします。
PlaceholderAPINotFound: PlaceholderAPI プラグインが見つかりません。権限グループ称号機能が使用できず、無効化されました
PluginEnabled: 領地プラグインが起動しました
PluginVersion: バージョン:%s
PlaceholderAPIRegisterSuccess: PlaceholderAPI 拡張が成功しました
LoadedGroupAmount: 合計 %d の領地グループがロードされました
AutoCleanStart: 長期間ログインしていないプレイヤーの領地データを自動クリーニングするプロセスを開始します
AutoCleanPlayer: プレイヤー %s の領地データをクリーニングしました
AutoCleanEnd: 自動クリーニング完了
MapInfoDetail: <div>%s</div><div>すべての人:%s</div>
TUI:
NotDominionOwnerOrAdminForPage: あなたは領地 %s の所有者または管理者ではありません。このページにアクセスする権限がありません
CommandHelp:
Title: 領地プラグインコマンドヘルプ
SubTitle: <>は必須パラメータを、[]はオプションパラメータを表します
Navigation:
Menu: メインメニュー
DominionList: 私の領地
Manage: 管理インターフェース
EnvSetting: 環境設定
GuestSetting: ゲスト権限
MemberList: メンバーリスト
MemberSetting: メンバー権限
GroupList: 権限グループリスト
GroupSetting: 権限グループ管理
AllDominion: すべての領地
TemplateList: テンプレートリスト
TemplateSetting: テンプレート管理
MigrateList: Resデータリスト
TitleList: 権限グループ称号リスト
ManageButton: 管理
DeleteButton: 削除
SearchButton: 検索
BackButton: 戻る
SelectButton: 選択
EditButton: 編集
Menu:
Title: Dominion 領地システム
CreateDominionButton: 領地を作成
CreateDominionDescription: あなたを中心に新しい領地を自動で作成します
MyDominionButton: 私の領地
MyDominionDescription: 私の領地リストを表示
TitleListButton: 称号リスト
TitleListDescription: 権限グループ称号を表示/使用
TemplateListButton: テンプレートリスト
TemplateListDescription: メンバー権限テンプレートリスト
CommandHelpButton: コマンドヘルプ
CommandHelpDescription: コマンドリストを表示
DocumentButton: 使用ドキュメント
DocumentDescription: ブラウザで使用ドキュメントを開く
MigrateButton: データを移行
MigrateDescription: あなたの領地をResidenceからDominionに移行します
AllDominionButton: すべての領地
AllDominionDescription: すべての領地を表示
ReloadCacheButton: キャッシュをリロード
ReloadCacheDescription: 手動でキャッシュをリロードすると、一部のプレイヤー操作が無効になる問題を解決できます。ただし頻繁に行うことは推奨されません
ReloadConfigButton: 設定をリロード
ReloadConfigDescription: 設定ファイルをリロード
OpOnlySection: '--- 以下のオプションはOP専用 ---'
DominionList:
Title: 私の領地リスト
AdminSection: '--- あなたが管理者権限を持つ領地 ---'
DominionManage:
Title: 領地 %s 管理インターフェース
InfoButton: 詳細情報
InfoDescription: 領地の詳細情報を表示
EnvSettingButton: 環境設定
EnvSettingDescription: 領地内の環境の行動を設定します
GuestSettingButton: ゲスト権限
GuestSettingDescription: この領地でのゲストの権限を設定します
MemberListButton: メンバー管理
MemberListDescription: この領地メンバーの権限を管理します
GroupListButton: 権限グループ
GroupListDescription: この領地の権限グループを管理します
SetTpLocationButton: テレポートポイントを設定
SetTpLocationDescription: 現在地をこの領地のテレポートポイントとして設定します
RenameButton: リネーム
RenameDescription: 領地をリネームします
EditJoinMessageButton: ウェルカムメッセージを編集
EditJoinMessageDescription: プレイヤーが領地に入ると表示されるメッセージ
EditLeaveMessageButton: 離脱メッセージを編集
EditLeaveMessageDescription: プレイヤーが領地を離れると表示されるメッセージ
SetMapColorButton: 地塊の色を設定
SetMapColorDescription: 衛星地図上の地塊の色を設定します
NotInDominion: あなたはどの領地内にもいないため、領地名を指定してください /dominion manage <領地名>
EnvSetting:
Title: 領地 %s の環境設定
Usage: '用法: /dominion env_setting <領地名> [ページ番号]'
GuestSetting:
Title: 領地 %s のゲスト権限
Usage: '用法: /dominion guest_setting <領地名> [ページ番号]'
SizeInfo:
Title: 領地 %s のサイズ情報
Owner: 領地の所有者:
Size: 領地のサイズ:
Center: 中心座標:
Vertical: 垂直高さ:
VertY: Y軸座標
Square: 水平面積:
Volume: 領地の体積:
TpLocation: テレポートポイント座標:
NoneTp: なし
Usage: あなたはどの領地内にもいないため、領地名を指定してください /dominion info <領地名>
MemberList:
Title: 領地 %s のメンバーリスト
AddButton: メンバーを追加
FlagButton: 権限
FlagDescription: メンバー権限を設定
RemoveButton: 削除
RemoveDescription: このメンバーを削除(訪問者に変更)します
NoPermissionSet: あなたは領地主人ではないため、管理者権限を編集できません
NoPermissionRemove: あなたは領地主人ではないため、管理者を削除できません
BelongToGroup: このメンバーは権限グループ %s に属しているため、個別に権限を編集できません
Usage: '用法: /dominion member list <領地名> [ページ番号]'
AdminTag: これは管理者です
NormalTag: これは一般メンバーです
BlacklistTag: これはブラックリストメンバーです
GroupTag: このメンバーは権限グループに所属しています
MemberSetting:
Title: プレイヤー %s の領地 %s の権限設定
ApplyTemplateButton: テンプレートを適用
ApplyTemplateDescription: 権限テンプレートを選択して適用します
Usage: '用法: /dominion member setting <領地名> <プレイヤー名> [ページ番号]'
SelectPlayer:
Title: プレイヤーを選択してメンバーに追加
Description: ログイン済みのプレイヤーのみを選択できます
Usage: '用法: /dominion member select_player <領地名> [ページ番号]'
SelectTemplate:
Title: テンプレートを選択
Description: 領地 %s のメンバー %s に適用します
Usage: '用法: /dominion member select_template <領地名> <プレイヤー名> [ページ番号]'
GroupList:
Title: 領地 %s 権限グループリスト
CreateButton: 権限グループを作成
CreateDescription: 新しい権限グループを作成します
DeleteDescription: 権限グループ %s を削除
EditDescription: 権限グループ %s を編集
AddMemberDescription: メンバーを権限グループ %s に追加
RemoveMemberDescription: '%s を権限グループ %s から削除'
Usage: '用法: /dominion group list <領地名> [ページ番号]'
GroupSetting:
RenameButton: この権限グループの名前を変更
Usage: '用法: /dominion group setting <領地名> <権限グループ名> [ページ番号]'
TitleL: '権限グループ '
TitleR: ' 管理'
RenameDescription: 権限グループ %s をリネーム
SelectMember:
Title: メンバーを選択
Description: メンバーを権限グループ %s に追加するためにメンバーを選択します
Usage: '用法: /dominion group select_member <領地名> <権限グループ名> [回声ページ番号] [ページ番号]'
TemplateList:
Title: メンバー権限テンプレートリスト
CreateButton: メンバー権限テンプレートを作成
CreateDescription: 新しいメンバー権限テンプレートを作成します
TemplateSetting:
Title: テンプレート %s 権限管理
Migrate:
Title: Residence からデータを移行
NoData: 移行可能なデータがありません
Button: 移行
SubDominion: 子領地は手動で移行できず、親領地に従って自動的に移行します
TitleList:
Title: 私が使用できる権限グループ称号
RemoveButton: 取り除く
ApplyButton: 使用
FromDominion: 領地から:
CUI:
Input:
CreateDominion: 作成する領地の名前を入力してください
CreateGroup: 作成する権限グループの名前を入力してください
CreateTemplate: 作成するテンプレート名を入力してください
EditEnterMessage: テリトリーの入場メッセージ内容を編集
EditLeaveMessage: テリトリーの退場メッセージ内容を編集
AddMember: メンバーとして追加するプレイヤー名を入力してください
RenameDominion: テリトリーをリネーム
RenameGroup: 権限グループのリネーム
SetMapColor: 地図のブロックの色を入力してください16進数
Config:
Check:
AutoCreateRadiusError: AutoCreateRadiusは0にできません、10にリセットされました
AutoCleanAfterDaysError: AutoCleanAfterDaysは0にできません、180にリセットされました
ToolNameError: ツール名の設定が誤っています、ARROWにリセットされました
LimitSizeXError: Limit.SizeXは4未満にはできません、128にリセットされました
LimitSizeYError: Limit.SizeYは4未満にはできません、64にリセットされました
LimitSizeZError: Limit.SizeZは4未満にはできません、128にリセットされました
LimitMinYError: Limit.MinYはLimit.MaxY以上にはできません、-64と320にリセットされました
RefundError: Economy.Refundの設定が不正です、0.85にリセットされました
PriceError: Economy.Priceの設定が不正です、10.0にリセットされました
LimitSizeYAutoAdjust: Limit.Vertを有効にするとき、Limit.SizeYはLimit.MaxY - Limit.MinY未満にできません、自動調整されました%d
AmountError: Limit.Amountの設定が不正です、10にリセットされました
DepthError: Limit.Depthの設定が不正です、3にリセットされました
GroupMinYError: 権限グループ%sのMinYはMaxY以上にできません-64と320にリセットされました
GroupSizeXError: 権限グループ%sのSizeX設定が小さすぎます、128にリセットされました
GroupSizeYError: 権限グループ%sのSizeY設定が小さすぎます、64にリセットされました
GroupSizeZError: 権限グループ%sのSizeZ設定が小さすぎます、128にリセットされました
GroupAmountError: 権限グループ%sのAmountの設定が不正です、10にリセットされました
GroupDepthError: 権限グループ%sのDepthの設定が不正です、3にリセットされました
GroupPriceError: 権限グループ%sのPriceの設定が不正です、10.0にリセットされました
GroupRefundError: 権限グループ%sのRefundの設定が不正です、0.85にリセットされました
LoadFlagError: 権限設定の読み込みに失敗しました:%s
TpDelayError: テレポート遅延は0未満にできません、0にリセットされました
TpCoolDownError: テレポートクールダウンは0未満にできません、0にリセットされました
Comment:
Language: 言語設定は、languagesフォルダ内のファイル名を参照してください
AutoCreateRadius: 自動で作成される領土の半径、単位はブロック
NegativeOneDisabled: '-1は無効化を示します'
DefaultLimit: デフォルトプレイヤー制限
SpawnProtectRadius: スポーン点保護半径 スポーン点この範囲内では領土を取ることはできません
MinY: 最小Y座標
MaxY: 最大Y座標
NegativeOneUnlimited: '-1は制限なしを示します'
SizeX: X方向の最大長さ
SizeY: Y方向の最大長さ
SizeZ: Z方向の最大長さ
Amount: 最大領土数
Depth: サブ領土の深さ
ZeroDisabled: 0は無効化を示します
Vert: MaxYとMinYに自動延長するか
OpBypass: OP が領地制限を無視することを許可しますか?
TpDelay: テレポート遅延 秒
TpCoolDown: テレポートクールダウン 秒
AutoCleanAfterDays: 長期間オフラインのプレイヤーの領土を自動的にクリーンアップする(日)
ToolName: 領土ツール名
Economy: 経済設定
VaultRequired: Vault事前プラグインとプラグインのインストールが必要
Price: 領土の価格 各ブロックの単位
OnlyXZ: xz平面の面積のみを計算するか
Refund: 領土を削除または縮小する際の返金比率
FlyPermission: フライト権限ノード - 次のいずれかの権限ノードを持つプレイヤーはこのプラグインによりフライトを阻止されません
ResidenceMigration: プレイヤーがResidenceから領土データを移行できるか
GroupTitle: 権限グループ称号 - 権限グループを称号として使用するPlaceholderAPIプラグインが必要
GroupTitleVariable: '変数: %dominion_group_title%'
GroupTitleColor: '前後の接頭辞に色を追加する場合はこの形式を使用してください &#ffffff'
PerformanceTimer: パフォーマンステストタイマー
GroupLine1: '>---------------------------------<'
GroupLine2: '| 領土制限特別権限グループ設定 |'
GroupLine3: '>---------------------------------<'
GroupLine4: このファイルはテンプレートとして使用できます。このファイルをコピーして任意の名前に変更し、
GroupLine5: 権限グループ名を変更した後、サポートプレイヤーまたはVIPに特典を付与するには、
GroupLine6: 例えば、低価格での領土取得や広い領土など、
GroupLine7: ここで設定します。詳細な説明については、以下のリンクを参照してください:
GroupLine8DocumentAddress: '> https://dominion.lunadeer.cn/%s/operator/privilege.html'
WorldSettings: 特定のワールドの領土ルールを単独で設定(設定しない場合は上記のルールを使用)
Flags:
admin:
DisplayName: 管理者
Description: 領土内の他のメンバーの権限を管理
anchor:
DisplayName: リスポーンアンカー
Description: リスポーンアンカーの設定/使用を許可しているか
animal_killing:
DisplayName: 動物にダメージを与える
Description: 動物にダメージを与えることを許可しているか
animal_spawn:
DisplayName: 動物生成(繁殖)
Description: 動物の生成(繁殖を含む)を許可しているか
animal_move:
DisplayName: 動物の移動
Description: 動物が(向かって)領土内で移動することを許可しているか
anvil:
DisplayName: 金床を使用
Description: 金床を使用することを許可しているか
beacon:
DisplayName: ビーコントランザクション
Description: ビーコンと相互作用することを許可しているか
bed:
DisplayName: ベッドの相互作用
Description: ベッドで寝るまたはリスポーンポイントを設定することを許可しているか
brew:
DisplayName: 醸造台を使用
Description: 醸造台を使用できるか
break:
DisplayName: ブロックを破壊
Description: ブロックを破壊することを許可しているか(一般ブロック、展示フレーム、アーマースタンドを含む)
button:
DisplayName: ボタンを使用
Description: さまざまな素材のボタンを使用することを許可しているか
cake:
DisplayName: ケーキを食べる
Description: ケーキを食べることを許可しているか
container:
DisplayName: 一般的な容器
Description: 含まれます:箱、バレル、シャドウボックス、アーマースタンド、展示用フレーム
craft:
DisplayName: 作業台を使用
Description: 作業台を使用できるか
crafter:
DisplayName: クラフター
Description: 自動クラフターを変更することを許可しているか
creeper_explode:
DisplayName: クリーパーの爆発/非TNT爆発
Description: 含まれます:クリーパー、ウィザーの頭、エンダークリスタル、ファイアボール、ベッド、リスポーンアンカーの爆発など
comparer:
DisplayName: コンパレータの相互作用
Description: コンパレータの状態を変更することを許可しているか
door:
DisplayName: ドアの相互作用
Description: さまざまな素材のドア(トラップドアを含む)を使用することを許可しているか
dragon_break_block:
DisplayName: エンダードラゴンのブロック破壊
Description: エンダードラゴンがブロックを破壊することを許可するか
dragon_egg:
DisplayName: ドラゴンエッグを触る
Description: ドラゴンエッグに触れることを許可しているか
dye:
DisplayName: 染色
Description: 染料(羊、犬の首輪、猫の首輪)で染色することを許可しているか
edit_sign:
DisplayName: 看板を編集
Description: 看板を編集することを許可しているか
egg:
DisplayName: 卵を投げる
Description: 卵を投げることを許可しているか
enchant:
DisplayName: エンチャントテーブルを使用
Description: エンチャントテーブルを使用できるか
ender_man:
DisplayName: エンダーマンの行動
Description: エンダーマンが生成されるか、ワープできるか
ender_pearl:
DisplayName: エンダーパールを投げる
Description: エンダーパールを使用できるか
feed:
DisplayName: 動物を餌やり
Description: 動物を餌やりできるか
fire_spread:
DisplayName: 火の広がり
Description: 火が広がることを許可しているか
flow_in_protection:
DisplayName: 外部液体が入ることができるか
Description: 含む:マグマ、水(領土内の液体の拡大を妨げない)
fly:
DisplayName: 飛行
Description: エリトラの飛行ではなく、クリエイティブモードのように飛行します
glow:
DisplayName: プレイヤーの光
Description: 発光の矢のようなハイライト効果
harvest:
DisplayName: 収穫
Description: 作物、植物を収穫する
honey:
DisplayName: 蜂の巣との相互作用
Description: 蜂蜜を採取できるか
hook:
DisplayName: フックを使用
Description: フックを使用できるか
hopper:
DisplayName: 特殊容器
Description: 含む:ホッパー/炉/発射器/投擲器/高炉/燻製器
hopper_outside:
DisplayName: 領土外のホッパーが領土内のチェストに対して有効か
Description: 領土外のホッパーが領土内のチェストに対して有効か
ignite:
DisplayName: 点火
Description: 火打石を使用して点火できるか
item_frame_interactive:
DisplayName: アイテムフレームとの相互作用
Description: アイテムフレームと相互作用できるか(アイテムフレームのものを回転)
item_frame_proj_damage:
DisplayName: 投げ物で展示フレーム/絵を壊せるか
Description: 非プレイヤーが発した投げ物で展示フレーム/絵などの吊るし物を壊せるか
lever:
DisplayName: レバーを使用
Description: レバーを使用できるか
mob_drop_item:
DisplayName: モンスターアイテムドロップ
Description: モンスター死亡時ドロップを生成するか
monster_killing:
DisplayName: モンスターにダメージを与える
Description: プレイヤーがモンスターにダメージを与えることができるか
monster_spawn:
DisplayName: モンスター生成
Description: モンスターを生成できるか
monster_move:
DisplayName: モンスター移動
Description: '(領土内へ)移動できるか'
move:
DisplayName: 移動
Description: 移動できるか
note_block:
DisplayName: ノートブロックをクリック
Description: レッドストーン音楽や一部のレッドストーン装置で使用される...
place:
DisplayName: ブロックを設置
Description: ブロックを設置できるか(一般ブロック、展示フレーム、マグマ、水を含む)
piston_outside:
DisplayName: ピストンは領土を越えてブロックを押すことができるか
Description: ピストンが領土内に物を押したり外に押し出すことができるか
pressure:
DisplayName: プレッシャープレートの相互作用
Description: さまざまな材料のプレッシャープレートを触発できるか
riding:
DisplayName: 乗り物に乗る
Description: さまざまな乗り物に乗ることを許可しているか
repeater:
DisplayName: リピーターの相互作用
Description: リピーターとの相互作用を許可しているか
shear:
DisplayName: 羊毛を刈る
Description: 羊毛を刈ることを許可しているか
shoot:
DisplayName: 投げ型武器
Description: 矢を射る/雪球/トライデント/風弾を含む
show_border:
DisplayName: 領土境界を表示
Description: 領土境界を表示するか
teleport:
DisplayName: 領土テレポート
Description: 領土テレポートを有効にするか
tnt_explode:
DisplayName: TNT爆発
Description: TNTが爆発することを許可しているか
trade:
DisplayName: 村人との取引
Description: 村人と取引することを許可しているか
trample:
DisplayName: 作物を踏む
Description: 作物を踏むことを許可しているか(無効にすると耕作地を保護)
trig_pressure_proj:
DisplayName: 投げ物でプレッシャープレートを触発
Description: 投げ物(矢/風弾/雪球)をプレッシャープレートに触発できるか
trig_pressure_mob:
DisplayName: 生物がプレッシャープレートを触発
Description: 生物(プレイヤーを含まない)がプレッシャープレートを触発できるか
trig_pressure_drop:
DisplayName: 落下物がプレッシャープレートを触発
Description: 落下物がプレッシャープレートを触発できるか
vehicle_destroy:
DisplayName: 乗り物を破壊
Description: 乗り物(主に鉱車)を破壊することを許可しているか
vehicle_spawn:
DisplayName: 乗り物を生成
Description: 乗り物(主に鉱車)を生成することを許可しているか
villager_killing:
DisplayName: 村人にダメージを与える
Description: 村人にダメージを与えることを許可しているか
villager_spawn:
DisplayName: 村人の繁殖
Description: ウィザーの生成とウィザーが生成する爆発
wither_spawn:
DisplayName: ウィザー生成
Description: 死にゆくもの生成および死にゆくもの生成時に発生する爆発
Localization:
LoadLanguageSuccess: 言語ファイル ja-jp を正常にロードしました
LoadLanguageFailed: 言語ファイルのロードに失敗しました:%s
LanguageFileNotFound: 言語ファイル %s が見つかりませんでした。デフォルトの zh-cn を使用します。
Utils:
TeleportUnsafe: テレポート先が安全ではないため、テレポートがキャンセルされました
CheckingUpdate: 更新を確認中...
NewVersion: 新しいバージョンが見つかりました:%s
VersionInfo: バージョン情報:
DownloadPage: ダウンロードページ:%s
CurrentVersion: 現在は最新バージョンです:%s
GetUpdateFailed: '更新の取得に失敗しました: %s'
NewVersionConsole: 新しいバージョンが見つかりました:%s 詳細はコンソールを確認するか、下のリンクをクリックしてください
VaultNotAvailable: Vault は利用できません
VaultUnlockedNotAvailable: VaultUnlocked は利用できません
NoEconomyPlugin: 利用可能な経済プラグインがありません
TUI:
Navigation: ナビゲーション
NoContent: ああ、ここにはまだ内容がありません~
PageError: ページ番号エラー
Add: 追加
Sub: 削除
PreviousPage: 前のページ
NextPage: 次のページ
PageL: '第 '
PageR: ' ページ '
CUI:
Input: 入力してください
InputBox: 入力ボックス
NotAvailable: CUI テキスト入力機能は非 Paper 系サーバーでは利用できません。コマンドを使用して対応する操作を実行してください。
SuggestCommand: '参考コマンド: %s'
LeftRightClick: 左クリックで確認 右クリックでキャンセル
NoSpace: 入力内容にスペースを含めることはできません
Database:
Connecting: '%s データベースに接続中'
UnsupportedType: 'サポートされていないデータベースタイプ: '
ConnectionFailed: 'データベース接続失敗: '
ConnectionSuccess: データベース接続成功
Reconnecting: データベースへの再接続を試みています
ReconnectionSuccess: データベースへの再接続に成功しました
ReconnectionFailed: データベースへの再接続に失敗しました
ErrorTitle: '=== 深刻なエラー ==='
ReconnectionUnexpected: データベース接続が予期せず閉じられました。再接続を試みています
OperationAbort: 操作が中止されました
OperationFailed: 'データベース操作に失敗しました: '
Closing: データベース接続を閉じています
Closed: データベース接続は閉じられました
CloseFailed: 'データベース接続のクローズに失敗しました: '
CheckColumnFailed: 列の存在確認に失敗しました
CheckTableFailed: テーブルの存在確認に失敗しました

727
languages/zh-classical.yml Normal file
View File

@ -0,0 +1,727 @@
# Help us to translate this file into your language.
# Guide: https://github.com/ColdeZhang/Dominion/blob/master/CONTRIBUTING.md#translate-plugin-messages-
# Don't forget to leave your name here, so that we can give you credit for your translation.
# Translated by: cygbs
Commands:
Dominion:
SetFlagUsage: '用法: /dominion set <权限名称> <true/false> [领地名称]'
CreateDominionUsage: '用法: /dominion create <领地名称>'
CreateSelectPointsFirst: 恳请君上启用之以供御疆,命曰“/dominion auto_create <领地名称>”,由此创生自动之领地。
CreateSubDominionUsage: '用法: /dominion create_sub <子领地名称> [父领地名称]'
CreateSubSelectPointsFirst: 欲先定界子领地,可择工具以标对角线之两点,界定其范围;或借由指令“/dominion auto_create_sub <子领地名称> [父领地名称]”自动生成子领地,并指定其父领地,以明其属。
AutoCreateDominionUsage: '用法: /dominion auto_create <领地名称>'
AutoCreateSubDominionUsage: '用法: /dominion auto_create_sub <子领地名称> [父领地名称]'
AutoCreateDominionDisabled: 自动辟地之功能已闭。
ExpandDominionUsage: '用法: /dominion expand [大小] [领地名称]'
ContractDominionUsage: '用法: /dominion contract [大小] [领地名称]'
SizeShouldBeInteger: 若论领地之大小,理应为整数所量。盖因尺寸度量,非可细至毫厘,必以整数计之,方能明晰无误,便于管理也。
SizeShouldBePositive: 若论领地之广袤,理当超越零数,必为正整数所限。盖零者,无物之象,而领地则需实体之域,方能立足于世,故大小之设,必大于零,方合情理。
DeleteDominionUsage: '用法: /dominion delete <领地名称>'
SetEnterMessageUsage: '用法: /dominion set_enter_msg <提示语> [领地名称]'
SetLeaveMessageUsage: '用法: /dominion set_leave_msg <提示语> [领地名称]'
SetTpLocationUsage: '用法: /dominion set_tp_location [领地名称]'
RenameDominionUsage: '用法: /dominion rename <原领地名称> <新领地名称>'
GiveDominionUsage: '用法: /dominion give <领地名称> <玩家名称>'
TpDominionUsage: '用法: /dominion tp <领地名称>'
DominionNotExist: 领地尚不存矣!
SetMapColorUsage: '用法: /dominion set_map_color <颜色> [领地名称]'
Group:
CreateGroupUsage: '用法: /dominion group create <领地名称> <权限组名称>'
DeleteGroupUsage: '用法: /dominion group delete <领地名称> <权限组名称>'
RenameGroupUsage: '用法: /dominion group rename <领地名称> <权限组旧名称> <新名称>'
SetGroupFlagUsage: '用法: /dominion group set_flag <领地名称> <权限组名称> <权限名称> <true|false>'
AddGroupMemberUsage: '用法: /dominion group add_member <领地名称> <权限组名称> <玩家名称>'
RemoveGroupMemberUsage: '用法: /dominion group remove_member <领地名称> <权限组名称> <玩家名称>'
GroupUsage: '用法: /dominion group <create|delete|rename|set_flag|add_member|remove_member|select_member|setting|list>'
NewGroupName: 新权柄之组名
Member:
DominionAddMemberUsage: '用法: /dominion member add <领地名称> <玩家名称>'
DominionSetFlagUsage: '用法: /dominion member set_flag <领地名称> <玩家名称> <权限名称> <true/false>'
DominionRemoveMemberUsage: '用法: /dominion member remove <领地名称> <玩家名称>'
DominionApplyTemplateUsage: '用法: /dominion member apply_template <领地名称> <玩家名称> <模板名称>'
MemberUsage: '用法: /dominion member <add/set_flag/remove/apply_template/list/setting/select_player/select_template>'
PageOptional: 页(可择)
ArgumentsNotEnough: 参数未足
UnknownArgument: 未知之参数
SizeInteger: 大小(必为整数)
DominionName: 领地名称
SubDominionName: 子领地名称
EnterMessageContent: 入而示语曰……
LeaveMessageContent: 出而示语曰……
InputColor: 绘色以十六进位之码输入之
NewDominionName: 新领地名称
Residence:
MigrationDisabled: Residence 迁移功能未启
MigrateUsage: '用法: /dominion migrate <res领地名称>'
NoMigrationData: 汝无数据可徙也
NoResidenceDominion: 未寻得所指定之“Residence”领地
ResidenceNotOwner: 汝非此领地之主,故不能徙之
MigrateFailed: '迁移失败: %s'
MigrateSuccess: 领地 %s 已从 Residence 迁移至 Dominion
Operator:
ReloadingDominionCache: 正自库中重载领地之缓存……
ReloadedDominionCache: 领地之缓存已重载
ReloadingPrivilegeCache: 正自库中重载玩家权限之缓存……
ReloadedPrivilegeCache: 玩家权限之缓存已重载
ReloadingGroupCache: 正自库中重载权限组之缓存……
ReloadedGroupCache: 权限组之缓存已重载
ExportingMCAList: 正导出领地所属之MCA文件名录……
CreateExportFolderFailed: 创建导出之文件夹未果
ExportingMCAListForWorld: 正导出 %s 之MCA文件名录……
DeleteMCAListFailed: 删除 %s 之MCA文件名录未果
CreateMCAListFailed: 创建 %s 之MCA文件名录未果
WriteMCAListFailed: 写入 %s 未果
ExportMCAListFailed: 导出 %s 之MCA文件名录未果
ExportedMCAList: MCA文件名录已导出至 %s
ReloadingConfig: 正重新加载配置文件……
ReloadedConfig: 配置文件已重新加载
Template:
CreateTemplateUsage: '用法: /dominion template create <模板名称>'
DeleteTemplateUsage: '用法: /dominion template delete <模板名称>'
SetTemplateFlagUsage: '用法: /dominion template set_flag <模板名称> <权限名称> <true/false>'
TemplateUsage: '用法: /dominion template <list|setting|delete|create|set_flag>'
NewTemplateName: 新模板名称
Title:
UseTitleUsage: '用法: /dominion use_title <权限组ID>'
RemoveTitleSuccess: 成功卸下权限组之称号
GroupNotExist: 权限组未存于世
GroupDominionNotExist: 权限组 %s 所属之领地,未寻得也
NotDominionMember: 君非领地 %s 之成员,故无法使用其称号
NotGroupMember: 君非权限组 %s 之成员,故无法使用其称号
UseTitleSuccess: 成功使用权限组 %s 之称号
UseTitleFailed: 使用称号未果:%s
Messages:
OpBypassTpLimit: 君乃OP故领地传送之限可无视之
WorldNotExist: 领地所在之世界,未寻得也
NoTpLocation: 领地 %s 未设传送点,将尝试传送至其中心
TpLocationNotInside: 领地 %s 之传送点,不在领地之内,将尝试传送至中心
TpToDominion: 已将君传送至 %s
TpDisabled: 管理员未启领地传送之功能
DominionNoTp: 此领地,传送禁止
GroupNoTp: 君之权限组,不得传送至此领地
PrivilegeNoTp: 君不得传送至此领地
TpCoolDown: 请待 %d 秒后再行传送
TpDelay: 传送将于 %d 秒后执行
TpCountDown: 传送倒计时 %d 秒
TpFailed: 传送未果,请再试之
CreateDominionFailed: 创建领地未果
CreateDominionSuccess: 成功创建领地 %s
DominionNameShouldNotEmpty: 领地之名,不可为空
DominionNameInvalid: 领地之名,不得含空格或点
DominionNameExist: 领地之名 %s已存于世
SelectPointsWorldNotSame: 两选点所在世界,不相一致
CreateDominionDisabledWorld: 世界 %s禁止创建领地
DominionAmountLimit: 君之领地数量,已达上限(%d个
ParentDominionNotExist: 父领地 %s未寻得也
RootDominionLost: 根领地已失!
NotParentDominionOwner: 君非父领地 %s 之主,故无法创建子领地
ParentDominionNotInSameWorld: 父领地与子领地,不在同一世界
OutOfParentDominionRange: 已超出父领地 %s 之范围
ConflictWithSpawnProtect: 与出生点保护相冲突
ConflictWithDominion: 与领地 %s 相冲突
DatabaseError: 数据库出错,请联络管理员
CannotGetDominionAuto: 无法自动获取君之所在领地,请指定其名
ExpandDominionFailed: 扩展领地未果
DominionWorldLost: 领地所在之世界已失
ParentDominionLost: 父领地已失
ExpandDominionSuccess: 成功扩展领地 %s %d 格
ContractDominionFailed: 缩小领地未果
ContractDominionConflict: 缩小后之领地,无法包含子领地 %s
ContractDominionSuccess: 成功缩小领地 %s %d 格
DeleteDominionFailed: 删除领地未果
DeleteDominionSuccess: 领地%s及其所有子领地已删除
DeleteDominionConfirm: 删除领地%s将同时删除其所有子领地是否继续
DeleteDominionForceConfirm: 请输入 /dominion delete %s force 以确认删除
SetEnterMessageSuccess: 成功设置领地 %s 之进入消息
SetLeaveMessageSuccess: 成功设置领地 %s 之离开消息
SetTpLocationFailed: 设置领地传送点未果
DominionNotExist: 领地 %s未寻得也
DominionWorldNotExist: 领地所在之世界,未寻得也
SetTpLocationSuccess: 成功设置领地 %s 之传送点于 %d %d %d
TpLocationNotInDominion: 传送点不在领地 %s 之内
RenameDominionFailed: 重命名领地未果
RenameDominionSameName: 新旧名称相同,无需更改
RenameDominionSuccess: 成功将领地 %s 重命名为 %s
GiveDominionFailed: 转让领地未果
PlayerNotExist: 玩家 %s 不存在或未曾登录
DominionAlreadyBelong: 领地 %s 已属 %s无需再转
SubDominionCannotGive: 子领地无法转让,可将 %s 设为管理员以管理领地%s
GiveDominionConfirm: 转让领地 %s 给 %s 将同时转让其所有子领地,是否继续?
GiveDominionForceConfirm: 请输入 /dominion give %s %s force 以确认转让
GiveDominionSuccess: 成功将领地 %s 及其所有子领地转让给 %s
SetMapColorFailed: 设置领地地图颜色未果
MapColorInvalid: 色彩之式不合
SetMapColorSuccess: 已设领地 %s 之卫星图色为 %s
SizeInvalid: 尺寸非法
SizeShouldBeGreaterThan4: 领地任一边长不得小于四
SizeXShouldBeLessThan: 领地X向东西之长不得过 %d
SizeYShouldBeLessThan: 领地Y向上下之高不得过 %d
SizeZShouldBeLessThan: 领地Z向南北之长不得过 %d
MaxYShouldBeLessThan: 领地Y标之上限不得过 %d
MinYShouldBeLessThan: 领地Y标之下限不得过 %d
DepthInvalid: 子领地之深非法
CreateSubDominionDisabled: 不许创子领地
DepthShouldBeLessThan: 子领地嵌套之深不得过 %d
NotDominionOwner: 非领地 %s 之主
NoEconomyPlugin: 无经济插件可用,请联服主
OpBypassEconomyCheck: 君为OP已略经济之检
NotEnoughMoney: 囊中羞涩,尚需 %.2f%s
ChargeMoney: 已扣 %.2f%s
RefundMoney: 已还 %.2f%s
CannotGetLocation: 无法知君之所在
CrossWorldOperationDisallowed: 禁跨世界之操作
NotInDominion: 君不在领地 %s 内,无法行此操作
CannotGetDirection: 无法知君所向
InvalidDirection: 所向非法 %s
ContractSizeInvalid: 领地缩小后之尺寸非法
SubDominionList: (子领地:%s
SetDominionFlagSuccess: 已设领地权限 %s 为 %s
UnknownFlag: 未知之权限 %s
PageNoPermission: 君无权访此页
CreateGroupFailed: 创建权限组 %s 失败
CreateGroupSuccess: 创建权限组 %s 成功
GroupNameInvalid: 权限组名不得含空
GroupNameExist: 领地 %s 已有名为 %s 之权限组
DeleteGroupFailed: 删除权限组 %s 失败
DeleteGroupSuccess: 删除权限组 %s 成功
GroupNotExist: 领地 %s 无名为 %s 之权限组
SetGroupFlagFailed: 设权限组 %s 之权限 %s 为 %s 失败
SetGroupFlagSuccess: 设权限组 %s 之权限 %s 为 %s 成功
NotDominionOwnerForGroup: 非领地 %s 之主,无法改管理员权限组之权限
RenameGroupFailed: 重命名权限组 %s 为 %s 失败
RenameGroupSuccess: 重命名权限组 %s 为 %s 成功
AddGroupMemberFailed: 添成员 %s 至权限组 %s 失败
AddGroupMemberSuccess: 添成员 %s 至权限组 %s 成功
NoPermissionForGroupMember: 君无权改领地 %s 之权限组 %s 成员
NotDominionOwnerForGroupMember: 非领地 %s 之主,无法添成员至管理员权限组
PlayerNotDominionMember: 玩家 %s 非领地 %s 之成员,无法直入权限组
PlayerAlreadyInGroup: 玩家 %s 已在权限组 %s 中
PlayerIsOwnerForGroupMember: '%s 乃管理员,非领地 %s 之主,无法添管理员至权限组'
RemoveGroupMemberFailed: 自权限组 %s 除成员 %s 失败
RemoveGroupMemberSuccess: 自权限组 %s 除成员 %s 成功
NoPermissionForRemoveGroupMember: 君无权自领地 %s 之权限组 %s 除成员
NotDominionOwnerForRemoveGroupMember: 非领地 %s 之主,无法自管理员权限组除成员
PlayerNotMember: 玩家 %s 非领地 %s 之成员
PlayerNotInGroup: 玩家 %s 不在权限组 %s 中
RemoveMemberFailed: 自领地 %s 除玩家 %s 失败
RemoveMemberSuccess: 自领地 %s 除玩家 %s 成功
SetMemberFlagFailed: 设玩家 %s 于领地 %s 之权限 %s 为 %s 失败
SetMemberFlagSuccess: 设玩家 %s 于领地 %s 之权限 %s 为 %s 成功
PlayerBelongToGroup: 玩家 %s 属 %s 权限组,无法单设权限
AddMemberFailed: 添玩家 %s 至领地成员 %s 失败
AddMemberSuccess: 添玩家 %s 至领地成员 %s 成功
PlayerAlreadyMember: 玩家 %s 已是领地 %s 之成员
ApplyTemplateSuccess: 应用模板 %s 到玩家 %s 在领地 %s 的权限成功
ApplyTemplateFailed: 应用模板 %s 到玩家 %s 在领地 %s 的权限失败
TemplateNotExist: 模板 %s 不存在
NotDominionOwnerForRemoveAdmin: 你不是领地 %s 的拥有者,无法移除一个领地管理员
NotDominionOwnerForSetAdmin: 你不是领地 %s 的拥有者,无法修改其他玩家管理员的权限
OwnerCannotBeMember: 玩家 %s 是领地 %s 的拥有者,不可以被添加为成员
CreateTemplateSuccess: 创建模板 %s 成功
CreateTemplateFailed: 创建模板 %s 失败
TemplateNameInvalid: 模板名称不能包含空格
TemplateNameExist: 已经存在名为 %s 的权限模板
DeleteTemplateSuccess: 删除模板 %s 成功
DeleteTemplateFailed: 删除模板 %s 失败
SetTemplateFlagSuccess: 设置模板 %s 的权限 %s 为 %s 成功
SetTemplateFlagFailed: 设置模板 %s 的权限 %s 为 %s 失败
CommandPlayerOnly: 该命令只能由玩家执行
NoPermission: 你没有 %s 权限执行此命令
NotDominionOwnerOrAdmin: 你不是领地 %s 的拥有者或管理员,无权修改权限
InSubDominion: 你当前在子领地内,请指定要操作的领地名称
NoPermissionForFlag: 你没有 %s (%s) 权限
BlueMapConnectFailed: 无法连接 BlueMap 插件,如果你不打算使用卫星地图渲染建议前往配置文件关闭此功能以避免下方的报错
DynmapRegisterSuccess: Dynmap 成功注册
DynmapConnectFailed: 无法连接到 Dynmap如果你不打算使用卫星地图渲染建议前往配置文件关闭此功能
PlaceholderAPINotFound: 未找到 PlaceholderAPI 插件,无法使用权限组称号功能,已自动关闭
PluginEnabled: 领地插件已启动
PluginVersion: 版本:%s
PlaceholderAPIRegisterSuccess: 成功注册 PlaceholderAPI 扩展
LoadedGroupAmount: 共加载了 %d 个领地组
AutoCleanStart: 开始自动清理长时间未登录玩家领地数据
AutoCleanPlayer: 已清理玩家 %s 的领地数据
AutoCleanEnd: 自动清理完成
MapInfoDetail: <div>%s</div><div>所有人:%s</div>
TUI:
NotDominionOwnerOrAdminForPage: 你不是领地 %s 的拥有者或管理员,无权访问此页面
CommandHelp:
Title: 领地插件命令帮助
SubTitle: <>者必需 []者可选
Navigation:
Menu: 主菜单
DominionList: 我的领地
Manage: 管理界面
EnvSetting: 环境设置
GuestSetting: 访客权限
MemberList: 成员列表
MemberSetting: 成员权限
GroupList: 权限组列表
GroupSetting: 权限组管理
AllDominion: 所有领地
TemplateList: 模板列表
TemplateSetting: 模板管理
MigrateList: Res数据列表
TitleList: 权限组称号列表
ManageButton: 管理
DeleteButton: 删除
SearchButton: 搜索
BackButton: 返回
SelectButton: 选择
EditButton: 编辑
Menu:
Title: Dominion 领地系统
CreateDominionButton: 创建领地
CreateDominionDescription: 以子为中心,自动创一新之领地
MyDominionButton: 我的领地
MyDominionDescription: 览我之领地列表
TitleListButton: 称号列表
TitleListDescription: 览/用权限组之称号
TemplateListButton: 模板列表
TemplateListDescription: 成员权限模板之列表
CommandHelpButton: 指令帮助
CommandHelpDescription: 览指令之列表
DocumentButton: 使用文档
DocumentDescription: 于浏览器中开使用之文档
MigrateButton: 迁移数据
MigrateDescription: 迁汝之领地从Residence至Dominion
AllDominionButton: 所有领地
AllDominionDescription: 览所有之领地
ReloadCacheButton: 重载缓存
ReloadCacheDescription: 手刷缓存可解一些玩家操作之无效问题,不建议频操
ReloadConfigButton: 重载配置
ReloadConfigDescription: 重载配置文件
OpOnlySection: '--- 以下选项仅OP可见 ---'
DominionList:
Title: 我的领地列表
AdminSection: '--- 以下为你拥有管理员权限的领地 ---'
DominionManage:
Title: 领地 %s 管理界面
InfoButton: 详细信息
InfoDescription: 览领地之详细
EnvSettingButton: 环境设置
EnvSettingDescription: 设领地内之环境行为
GuestSettingButton: 访客权限
GuestSettingDescription: 配访客于兹领地之权限
MemberListButton: 成员管理
MemberListDescription: 理此领地成员之权限
GroupListButton: 权限组
GroupListDescription: 理此领地之权限组
SetTpLocationButton: 设置传送点
SetTpLocationDescription: 设汝当前之位为此领地传送点
RenameButton: 重命名
RenameDescription: 更名领地
EditJoinMessageButton: 编辑欢迎提示语
EditJoinMessageDescription: 当玩家入领地时示之消息
EditLeaveMessageButton: 编辑离开提示语
EditLeaveMessageDescription: 当玩家离领地时示之消息
SetMapColorButton: 设置地块颜色
SetMapColorDescription: 设卫星图上之地块颜色
NotInDominion: 汝不在任何领地之内,请指定领地之名 /dominion manage <领地名称>
EnvSetting:
Title: 领地 %s 环境设置
Usage: '用法: /dominion env_setting <领地名称> [页码]'
GuestSetting:
Title: 领地 %s 访客权限
Usage: '用法: /dominion guest_setting <领地名称> [页码]'
SizeInfo:
Title: 领地 %s 的尺寸信息
Owner: 领地所有者:
Size: 领地大小:
Center: 中心坐标:
Vertical: 垂直高度:
VertY: Y轴坐标
Square: 水平面积:
Volume: 领地体积:
TpLocation: 传送点坐标:
NoneTp:
Usage: 汝不在任何领地之内,请指定领地之名 /dominion info <领地名称>
MemberList:
Title: 领地 %s 成员列表
AddButton: 添加成员
FlagButton: 权限
FlagDescription: 配成员之权限
RemoveButton: 移除
RemoveDescription: 移此成员出(变为访客)
NoPermissionSet: 汝非领地之主,不可编管理员之权限
NoPermissionRemove: 汝非领地之主,不可除管理员
BelongToGroup: 此成员属权限组 %s不可独编其权限
Usage: '用法: /dominion member list <领地名称> [页码]'
AdminTag: 此乃管理员
NormalTag: 此乃普通成员
BlacklistTag: 此乃黑名单成员
GroupTag: 此成员属一权限组
MemberSetting:
Title: 玩家 %s 于领地 %s 之权限置设
ApplyTemplateButton: 套用模板
ApplyTemplateDescription: 择一权限模板套用之
Usage: '用法: /dominion member setting <领地名称> <玩家名称> [页码]'
SelectPlayer:
Title: 选择玩家添加为成员
Description: 仅可选已登录之玩家
Usage: '用法: /dominion member select_player <领地名称> [页码]'
SelectTemplate:
Title: 选择一个模板
Description: 套用于领地 %s 之居者 %s
Usage: '用法: /dominion member select_template <领地名称> <玩家名称> [页码]'
GroupList:
Title: 领地 %s 权限组列表
CreateButton: 创建权限组
CreateDescription: 创一新之权限组
DeleteDescription: 删权限组 %s
EditDescription: 编权限组 %s
AddMemberDescription: 加成员至权限组 %s
RemoveMemberDescription: 移 %s 出权限组 %s
Usage: '用法: /dominion group list <领地名称> [页码]'
GroupSetting:
RenameButton: 重命名此权限组
Usage: '用法: /dominion group setting <领地名称> <权限组名称> [页码]'
TitleL: '权限组 '
TitleR: ' 管理'
RenameDescription: 重命名权限组 %s
SelectMember:
Title: 择居者
Description: 选择居者添之于权限组 %s
Usage: '用法: /dominion group select_member <领地名称> <权限组名称> [回显页码] [页码]'
TemplateList:
Title: 成员权限模板列表
CreateButton: 创建成员权限模板
CreateDescription: 创一新之成员权限模板
TemplateSetting:
Title: 模板 %s 权限管理
Migrate:
Title: 从 Residence 迁移数据
NoData: 汝无数据可迁
Button: 迁移
SubDominion: 子领地不可手动迁移,将随父领地自动迁之
TitleList:
Title: 汝可用之权限组称号
RemoveButton: 卸下
ApplyButton: 用之
FromDominion: 自领地:
CUI:
Input:
CreateDominion: 输入欲创之领地名称
CreateGroup: 输入欲创之权限组名称
CreateTemplate: 输入欲创之模板名称
EditEnterMessage: 编辑入领地之提示语内容
EditLeaveMessage: 编辑离领地之提示语内容
AddMember: 输入玩家名以加为成员
RenameDominion: 领地更名
RenameGroup: 权限组更名
SetMapColor: 输入卫星图上地块之色16进制
Config:
Check:
AutoCreateRadiusError: AutoCreateRadius 不能等于 0已重置为 10
AutoCleanAfterDaysError: AutoCleanAfterDays 不能等于 0已重置为 180
ToolNameError: 工具之名设误,已重置为 ARROW
LimitSizeXError: Limit.SizeX 之尺寸不得小于 4已重置为 128
LimitSizeYError: Limit.SizeY 之尺寸不得小于 4已重置为 64
LimitSizeZError: Limit.SizeZ 之尺寸不得小于 4已重置为 128
LimitMinYError: Limit.MinY 不得大于或等于 Limit.MaxY已重置为 -64 至 320
RefundError: Economy.Refund 设不合法,已重置为 0.85
PriceError: Economy.Price 设不合法,已重置为 10.0
LimitSizeYAutoAdjust: 启 Limit.Vert 时 Limit.SizeY 不得小于 Limit.MaxY - Limit.MinY已自动调为 %d
AmountError: Limit.Amount 设不合法,已重置为 10
DepthError: Limit.Depth 设不合法,已重置为 3
GroupMinYError: 权限组 %s 之 MinY 不得大于或等于 MaxY已重置为 -64 与 320
GroupSizeXError: 权限组 %s 之 SizeX 设过小,已重置为 128
GroupSizeYError: 权限组 %s 之 SizeY 设过小,已重置为 64
GroupSizeZError: 权限组 %s 之 SizeZ 设过小,已重置为 128
GroupAmountError: 权限组 %s 之 Amount 设不合法,已重置为 10
GroupDepthError: 权限组 %s 之 Depth 设不合法,已重置为 3
GroupPriceError: 权限组 %s 之 Price 设不合法,已重置为 10.0
GroupRefundError: 权限组 %s 之 Refund 设不合法,已重置为 0.85
LoadFlagError: 读权限配置败:%s
TpDelayError: 传送延不得小于 0已重置为 0
TpCoolDownError: 传送冷却不得小于 0已重置为 0
Comment:
Language: 语言设置,参 languages 文件夹下之名
AutoCreateRadius: 自动创领地之半径,方为块
NegativeOneDisabled: -1示不启
DefaultLimit: 默玩家圈地之限
SpawnProtectRadius: 出生点保护半径,出生点此范围内不允圈地
MinY: 最小Y坐标
MaxY: 最大Y坐标
NegativeOneUnlimited: -1示不限
SizeX: X向最大长
SizeY: Y向最大长
SizeZ: Z向最大长
Amount: 最大领地数
Depth: 子领地深度
ZeroDisabled: 0示不启
Vert: 是否自延至 MaxY 与 MinY
OpBypass: 是否允OP无视领地限
TpDelay: 传送延 秒
TpCoolDown: 传送冷却 秒
AutoCleanAfterDays: 自动清久未上线玩家之领地(天)
ToolName: 圈地工具名
Economy: 经济设
VaultRequired: 需安 Vault 前置及插件
Price: 圈地价格,方为块
OnlyXZ: 是否只计xz平面积
Refund: 删或缩领地时之退款比例
FlyPermission: 飞行权限节点 - 有以下任一权限节点之玩家,不被本插件拦飞行
ResidenceMigration: 是否允玩家从 Residence 迁领地数据
GroupTitle: 权限组称 - 用权限组作称(需PlaceholderAPI插件)
GroupTitleVariable: '变量: %dominion_group_title%'
GroupTitleColor: 前后缀如需加色,请用此格 &#ffffff
PerformanceTimer: 性能测计时器
GroupLine1: '>---------------------------------<'
GroupLine2: '| 圈地限制特殊权限组配置 |'
GroupLine3: '>---------------------------------<'
GroupLine4: 此文可为模,汝可复此文后重名之欲名
GroupLine5: 权限组名然后改其中之配。若欲给赞助玩家或VIP
GroupLine6: 特惠,如少之圈地价、大之领地等,汝可
GroupLine7: 此配。详说参以下链:
GroupLine8DocumentAddress: '> https://dominion.lunadeer.cn/%s/operator/privilege.html'
WorldSettings: 单设某世界之圈地规(如不设,则用以上规)
Flags:
admin:
DisplayName: 管理员
Description: 管理领地内的其他成员权限
anchor:
DisplayName: 重生锚
Description: 是否允许设置/使用重生锚
animal_killing:
DisplayName: 对动物造成伤害
Description: 是否允许对动物造成伤害
animal_spawn:
DisplayName: 动物生成(繁殖)
Description: 是否允许动物生成(包括繁殖)
animal_move:
DisplayName: 动物移动
Description: 是否允许动物在(向)领地内移动
anvil:
DisplayName: 使用铁砧
Description: 是否允许使用铁砧
beacon:
DisplayName: 信标交互
Description: 是否允许与信标交互
bed:
DisplayName: 床交互
Description: 是否允许使用床睡觉或设置重生点
brew:
DisplayName: 使用酿造台
Description: 是否可以使用酿造台
break:
DisplayName: 破坏方块
Description: 是否可以破坏方块(包括:一般方块、展示框、盔甲架)
button:
DisplayName: 使用按钮
Description: 是否可以使用各种材质的按钮
cake:
DisplayName: 吃蛋糕
Description: 是否可以吃蛋糕
container:
DisplayName: 一般容器
Description: 包含:箱子/木桶/潜影盒/盔甲架/展示框
craft:
DisplayName: 使用工作台
Description: 是否可以使用工作台
crafter:
DisplayName: 合成器
Description: 是否可以修改自动合成器
creeper_explode:
DisplayName: 生物破坏/非TNT爆炸
Description: 包含:苦力怕/凋零头颅/末影水晶/火球/床/重生锚爆炸等
comparer:
DisplayName: 比较器交互
Description: 是否可以修改比较器状态
door:
DisplayName: 门交互
Description: 是否可以使用各种材质的门(包括活板门)
dragon_break_block:
DisplayName: 末影龙破坏方块
Description: 末影龙冲撞是否可以破坏方块
dragon_egg:
DisplayName: 触碰龙蛋
Description: 是否可以触碰龙蛋
dye:
DisplayName: 染色
Description: 是否可以使用染料(对羊、狗项圈、猫项圈)染色
edit_sign:
DisplayName: 编辑告示牌
Description: 是否可以编辑告示牌
egg:
DisplayName: 扔鸡蛋
Description: 是否可以扔鸡蛋
enchant:
DisplayName: 使用附魔台
Description: 是否可以使用附魔台
ender_man:
DisplayName: 末影人行为
Description: 包含:末影人是否可以生成、瞬移
ender_pearl:
DisplayName: 投掷末影珍珠
Description: 是否可以使用末影珍珠
feed:
DisplayName: 喂养动物
Description: 是否可以喂养动物
fire_spread:
DisplayName: 火焰蔓延
Description: 是否可以火焰蔓延
flow_in_protection:
DisplayName: 外部流体是否可以进入
Description: 包含:岩浆、水(不会阻止领地内部的流体蔓延)
fly:
DisplayName: 飞行
Description: 不是翅鞘飞行,是类似于创造模式的飞行
glow:
DisplayName: 玩家发光
Description: 类似光灵箭的高亮效果
harvest:
DisplayName: 收获
Description: 收获庄稼、作物
honey:
DisplayName: 蜂巢交互
Description: 是否可以采蜂蜜
hook:
DisplayName: 使用钓钩
Description: 是否可以使用钓钩
hopper:
DisplayName: 特殊容器
Description: 包含:漏斗/熔炉/发射器/投掷器/高炉/烟熏炉
hopper_outside:
DisplayName: 领地外漏斗对领地内箱子是否生效
Description: 领地外的漏斗是否可以对领地内的箱子生效
ignite:
DisplayName: 点燃
Description: 是否可以使用打火石点火
item_frame_interactive:
DisplayName: 展示框交互
Description: 是否可以与物品展示框交互(旋转展示框的东西)
item_frame_proj_damage:
DisplayName: 投掷物是否可以破坏展示框/画
Description: 非玩家发出的投掷物是否可以破坏展示框/画等悬挂物
lever:
DisplayName: 使用拉杆
Description: 是否可以使用拉杆
mob_drop_item:
DisplayName: 生物战利品掉落
Description: 生物死亡时是否产生掉落物
monster_killing:
DisplayName: 对怪物造成伤害
Description: 玩家是否可以对怪物造成伤害
monster_spawn:
DisplayName: 怪物生成
Description: 是否可以生成怪物
monster_move:
DisplayName: 怪物移动
Description: 是否可以在(向)领地内移动
move:
DisplayName: 移动
Description: 是否可以移动
note_block:
DisplayName: 点击音符盒
Description: 红石音乐或者某些红石机器会用到...
place:
DisplayName: 放置方块
Description: 是否可以放置方块(包括:一般方块、展示框、岩浆、水)
piston_outside:
DisplayName: 活塞是否可以跨领地推动方块
Description: 活塞是否可以往领地内推东西或推东西到领地外
pressure:
DisplayName: 压力板交互
Description: 是否可以触发各种材质的压力板
riding:
DisplayName: 骑乘载具
Description: 是否可以骑乘各种载具
repeater:
DisplayName: 中继器交互
Description: 是否可以与中继器交互
shear:
DisplayName: 剪羊毛
Description: 是否可以剪羊毛
shoot:
DisplayName: 投掷型武器
Description: 包括:射箭/雪球/三叉戟/风弹
show_border:
DisplayName: 显示领地边界
Description: 是否显示领地边界
teleport:
DisplayName: 领地传送
Description: 是否开启领地传送
tnt_explode:
DisplayName: TNT爆炸
Description: TNT是否可以爆炸
trade:
DisplayName: 村民交易
Description: 是否可以与村民交易
trample:
DisplayName: 作物践踏
Description: 是否可以践踏作物(关闭意味着保护耕地)
trig_pressure_proj:
DisplayName: 投掷物触发压力板
Description: 投掷物(箭/风弹/雪球)是否可以触发压力板
trig_pressure_mob:
DisplayName: 生物触发压力板
Description: 生物(不包含玩家)是否可以触发压力板
trig_pressure_drop:
DisplayName: 掉落物触发压力板
Description: 掉落物是否可以触发压力板
vehicle_destroy:
DisplayName: 破坏载具
Description: 是否可以破坏载具(主要是矿车)
vehicle_spawn:
DisplayName: 生成载具
Description: 是否可以生成载具(主要是矿车)
villager_killing:
DisplayName: 对村民造成伤害
Description: 是否可以对村民造成伤害
villager_spawn:
DisplayName: 村民繁殖
Description: 是否允许村民繁殖(包括村民蛋)
wither_spawn:
DisplayName: 凋零生成
Description: 凋零生成以及凋零生成时产生的爆炸
Localization:
LoadLanguageSuccess: 成功载之语言 zh-cn
LoadLanguageFailed: 未能载入之:%s
LanguageFileNotFound: Language file %s not found, using default lzh.
Utils:
TeleportUnsafe: 传送所向之地不安,已罢传送
CheckingUpdate: 正稽察更新中...
NewVersion: 新版见矣:%s
VersionInfo: 版本之资讯:
DownloadPage: 下载之页:%s
CurrentVersion: 当前已是版之至新:%s
GetUpdateFailed: '更新之取不得: %s'
NewVersionConsole: 新版见矣:%s 欲知详情,请视控制台或点下方之链
VaultNotAvailable: Vault 不可用
VaultUnlockedNotAvailable: VaultUnlocked 不可用
NoEconomyPlugin: 无可用之经济插件
TUI:
Navigation: 導航
NoContent: 嗟乎,此處尚無內容~
PageError: 頁碼有誤
Add:
Sub:
PreviousPage: 上一頁
NextPage: 下一頁
PageL: '第 '
PageR: ' 頁 '
CUI:
Input: 請輸入
InputBox: 輸入框
NotAvailable: CUI TextInput 功能於非 Paper 系服務端上不得用,請用指令行其事。
SuggestCommand: '參考指令: %s'
LeftRightClick: 左鍵確認 右鍵取消
NoSpace: 輸入內容切忌空格
Database:
Connecting: 正在連接到 %s 數據庫
UnsupportedType: '不支持之數據庫類型: '
ConnectionFailed: '數據庫連接不果: '
ConnectionSuccess: 數據庫連接已就
Reconnecting: 正試再連數據庫
ReconnectionSuccess: 再連數據庫成
ReconnectionFailed: 再連數據庫敗
ErrorTitle: === 嚴重之誤 ===
ReconnectionUnexpected: 數據庫連接忽斷,正試再連
OperationAbort: 操作中止
OperationFailed: '數據庫操作不果: '
Closing: 正閉數據庫連接
Closed: 數據庫連接已閉
CloseFailed: '閉數據庫連接不果: '
CheckColumnFailed: 尋列是否存在不果
CheckTableFailed: 尋表是否存在不果

View File

@ -4,7 +4,8 @@ Commands:
CreateDominionUsage: '用法: /dominion create <领地名称>'
CreateSelectPointsFirst: 请先使用工具选择领地的对角线两点,或使用 /dominion auto_create <领地名称> 创建自动领地
CreateSubDominionUsage: '用法: /dominion create_sub <子领地名称> [父领地名称]'
CreateSubSelectPointsFirst: 请先使用工具选择子领地的对角线两点,或使用 /dominion auto_create_sub <子领地名称> [父领地名称] 创建自动子领地
CreateSubSelectPointsFirst: 请先使用工具选择子领地的对角线两点,或使用 /dominion auto_create_sub <子领地名称>
[父领地名称] 创建自动子领地
AutoCreateDominionUsage: '用法: /dominion auto_create <领地名称>'
AutoCreateSubDominionUsage: '用法: /dominion auto_create_sub <子领地名称> [父领地名称]'
AutoCreateDominionDisabled: 自动创建领地功能已关闭
@ -34,7 +35,8 @@ Commands:
DominionAddMemberUsage: '用法: /dominion member add <领地名称> <玩家名称>'
DominionSetFlagUsage: '用法: /dominion member set_flag <领地名称> <玩家名称> <权限名称> <true/false>'
DominionRemoveMemberUsage: '用法: /dominion member remove <领地名称> <玩家名称>'
DominionApplyTemplateUsage: '用法: /dominion member apply_template <领地名称> <玩家名称> <模板名称>'
DominionApplyTemplateUsage: '用法: /dominion member apply_template <领地名称> <玩家名称>
<模板名称>'
MemberUsage: '用法: /dominion member <add/set_flag/remove/apply_template/list/setting/select_player/select_template>'
PageOptional: 页码(可选)
ArgumentsNotEnough: 参数不足
@ -71,19 +73,6 @@ Commands:
ExportedMCAList: MCA文件列表已导出到 %s
ReloadingConfig: 正在重新加载配置文件...
ReloadedConfig: 配置文件已重新加载
SetConfig:
MinYShouldBeLessThanMaxY: 最高Y坐标限制不能小于最低Y坐标限制
MaxYShouldBeGreaterThanMinY: 最低Y坐标限制不能大于最高Y坐标限制
SizeXShouldBeGreaterThan4: X轴(东西)最大尺寸不能小于4
SizeZShouldBeGreaterThan4: Z轴(南北)最大尺寸不能小于4
SizeYShouldBeGreaterThan4: Y轴(垂直)最大尺寸不能小于4
AmountShouldBeGreaterThan0: 每个玩家领地数量限制不能小于0
DepthShouldBeGreaterThan0: 领地深度限制不能小于0
TpDelayShouldBeGreaterThan0: 传送延迟不能小于0
TpCoolDownShouldBeGreaterThan0: 传送冷却时间不能小于0
PriceShouldBeGreaterThan0: 每方块单价不能小于0
RefundShouldBeGreaterThan0: 领地退款比例不能小于0
SpawnProtectRadiusShouldBeGreaterThan0: 出生点保护半径不能小于或等于0
Template:
CreateTemplateUsage: '用法: /dominion template create <模板名称>'
DeleteTemplateUsage: '用法: /dominion template delete <模板名称>'
@ -247,10 +236,10 @@ Messages:
PluginVersion: 版本:%s
PlaceholderAPIRegisterSuccess: 成功注册 PlaceholderAPI 扩展
LoadedGroupAmount: 共加载了 %d 个领地组
MapInfoDetail: <div>%s</div><div>所有人:%s</div>
AutoCleanStart: 开始自动清理长时间未登录玩家领地数据
AutoCleanPlayer: 已清理玩家 %s 的领地数据
AutoCleanEnd: 自动清理完成
MapInfoDetail: <div>%s</div><div>所有人:%s</div>
TUI:
NotDominionOwnerOrAdminForPage: 你不是领地 %s 的拥有者或管理员,无权访问此页面
CommandHelp:
@ -295,8 +284,6 @@ TUI:
MigrateDescription: 把你的领地从Residence迁移到Dominion
AllDominionButton: 所有领地
AllDominionDescription: 查看所有领地
ConfigButton: 系统配置
ConfigDescription: 查看/修改系统配置
ReloadCacheButton: 重载缓存
ReloadCacheDescription: 手动刷新缓存可解决一些玩家操作无效问题,不建议频繁操作
ReloadConfigButton: 重载配置
@ -423,31 +410,26 @@ CUI:
Config:
Check:
AutoCreateRadiusError: AutoCreateRadius 不能等于 0已重置为 10
MessageDisplayError: MessageDisplay 不能设置为 %s已重置为 ACTION_BAR
AutoCleanAfterDaysError: AutoCleanAfterDays 不能等于 0已重置为 180
ToolNameError: 工具名称设置错误,已重置为 ARROW
LimitSizeXError: Limit.SizeX 尺寸不能小于 4已重置为 128
LimitSizeYError: Limit.SizeY 尺寸不能小于 4已重置为 64
LimitSizeZError: Limit.SizeZ 尺寸不能小于 4已重置为 128
LimitMinYError: Limit.MinY 不能大于或等于 Limit.MaxY已重置为 -64 320
RefundError: Economy.Refund 设置不合法,已重置为 0.85
PriceError: Economy.Price 设置不合法,已重置为 10.0
LimitSizeYAutoAdjust: 启用 Limit.Vert 时 Limit.SizeY 不能小于 Limit.MaxY - Limit.MinY已自动调整为 %d
AmountError: Limit.Amount 设置不合法,已重置为 10
DepthError: Limit.Depth 设置不合法,已重置为 3
GroupMinYError: 权限组 %s 的 MinY 不能大于等于 MaxY已重置为 -64 和 320
GroupSizeXError: 权限组 %s 的 SizeX 设置过小,已重置为 128
GroupSizeYError: 权限组 %s 的 SizeY 设置过小,已重置为 64
GroupSizeZError: 权限组 %s 的 SizeZ 设置过小,已重置为 128
GroupAmountError: 权限组 %s 的 Amount 设置不合法,已重置为 10
GroupDepthError: 权限组 %s 的 Depth 设置不合法,已重置为 3
GroupPriceError: 权限组 %s 的 Price 设置不合法,已重置为 10.0
GroupRefundError: 权限组 %s 的 Refund 设置不合法,已重置为 0.85
GroupMinYError: '%s 的 MinY 不能大于等于 MaxY已重置为 -64 和 320'
GroupSizeXError: '%s 的 SizeX 设置过小,已重置为 128'
GroupSizeYError: '%s 的 SizeY 设置过小,已重置为 64'
GroupSizeZError: '%s 的 SizeZ 设置过小,已重置为 128'
GroupAmountError: '%s 的 Amount 设置不合法,已重置为 10'
GroupDepthError: '%s 的 Depth 设置不合法,已重置为 3'
GroupPriceError: '%s 的 Price 设置不合法,已重置为 10.0'
GroupRefundError: '%s 的 Refund 设置不合法,已重置为 0.85'
LoadFlagError: 读取权限配置失败:%s
TpDelayError: 传送延迟不能小于 0已重置为 0
TpCoolDownError: 传送冷却不能小于 0已重置为 0
Comment:
Language: 语言设置,参考 languages 文件夹下的文件名
AutoCreateRadius: 自动创建领地的半径,单位为方块
MessageDisplay: 提示消息显示位置BOSS_BAR, ACTION_BAR, TITLE, SUBTITLE, CHAT
MessageDisplayNoPermission: 玩家没有权限时的提示消息位置
MessageDisplayJoinLeave: 进入/离开领地时的提示消息位置
NegativeOneDisabled: -1表示不开启
DefaultLimit: 默认玩家圈地限制
SpawnProtectRadius: 出生点保护半径 出生点此范围内不允许圈地
@ -462,6 +444,7 @@ Config:
ZeroDisabled: 0表示不开启
Vert: 是否自动延伸到 MaxY 和 MinY
OpBypass: 是否允许OP无视领地限制
WorldSettings: 单独设置某个世界的圈地规则(如不设置则使用以上规则)
TpDelay: 传送延迟 秒
TpCoolDown: 传送冷却 秒
AutoCleanAfterDays: 自动清理长时间未上线玩家的领地(天)
@ -485,7 +468,6 @@ Config:
GroupLine6: 一些特殊优惠,例如更少的圈地价格、更大的领地等,你可以在
GroupLine7: 这里配置。详细说明参阅以下链接:
GroupLine8DocumentAddress: '> https://dominion.lunadeer.cn/%s/operator/privilege.html'
WorldSettings: 单独设置某个世界的圈地规则(如不设置则使用以上规则)
Flags:
admin:
DisplayName: 管理员
@ -580,6 +562,9 @@ Flags:
glow:
DisplayName: 玩家发光
Description: 类似光灵箭的高亮效果
gravity_block:
DisplayName: 允许外部重力方块落入
Description: 如果禁止则领地外重力方块进入领地会变为掉落物
harvest:
DisplayName: 收获
Description: 收获庄稼、作物

View File

@ -1,16 +1,14 @@
# Help us to translate this file into your language.
# Guide: https://github.com/ColdeZhang/Dominion/blob/master/CONTRIBUTING.md#plugin-messages
# Guide: https://github.com/ColdeZhang/Dominion/blob/master/CONTRIBUTING.md#translate-plugin-messages-
# Don't forget to leave your name here, so that we can give you credit for your translation.
# Translated by: YOUR_NAME_HERE
Commands:
Dominion:
SetFlagUsage: '用法: /dominion set <權限名稱> <true/false> [領地名稱]'
CreateDominionUsage: '用法: /dominion create <領地名稱>'
CreateSelectPointsFirst: 請先使用工具選擇領地的對角線兩點,或使用 /dominion auto_create <領地名稱> 創建自動領地
CreateSubDominionUsage: '用法: /dominion create_sub <子領地名稱> [父領地名稱]'
CreateSubSelectPointsFirst: 請先使用工具選擇子領地的對角線兩點,或使用 /dominion auto_create_sub <子領地名稱>
[父領地名稱] 創建自動子領地
CreateSubSelectPointsFirst: 請先使用工具選擇子領地的對角線兩點,或使用 /dominion auto_create_sub <子領地名稱> [父領地名稱] 創建自動子領地
AutoCreateDominionUsage: '用法: /dominion auto_create <領地名稱>'
AutoCreateSubDominionUsage: '用法: /dominion auto_create_sub <子領地名稱> [父領地名稱]'
AutoCreateDominionDisabled: 自動創建領地功能已關閉
@ -40,8 +38,7 @@ Commands:
DominionAddMemberUsage: '用法: /dominion member add <領地名稱> <玩家名稱>'
DominionSetFlagUsage: '用法: /dominion member set_flag <領地名稱> <玩家名稱> <權限名稱> <true/false>'
DominionRemoveMemberUsage: '用法: /dominion member remove <領地名稱> <玩家名稱>'
DominionApplyTemplateUsage: '用法: /dominion member apply_template <領地名稱> <玩家名稱>
<模板名稱>'
DominionApplyTemplateUsage: '用法: /dominion member apply_template <領地名稱> <玩家名稱> <模板名稱>'
MemberUsage: '用法: /dominion member <add/set_flag/remove/apply_template/list/setting/select_player/select_template>'
PageOptional: 頁碼(可選)
ArgumentsNotEnough: 參數不足
@ -78,19 +75,6 @@ Commands:
ExportedMCAList: MCA文件列表已導出到 %s
ReloadingConfig: 正在重新加載配置文件...
ReloadedConfig: 配置文件已重新加載
SetConfig:
MinYShouldBeLessThanMaxY: 最高Y坐標限製不能小於最低Y坐標限製
MaxYShouldBeGreaterThanMinY: 最低Y坐標限製不能大於最高Y坐標限製
SizeXShouldBeGreaterThan4: X軸(東西)最大尺寸不能小於4
SizeZShouldBeGreaterThan4: Z軸(南北)最大尺寸不能小於4
SizeYShouldBeGreaterThan4: Y軸(垂直)最大尺寸不能小於4
AmountShouldBeGreaterThan0: 每個玩家領地數量限製不能小於0
DepthShouldBeGreaterThan0: 領地深度限製不能小於0
TpDelayShouldBeGreaterThan0: 傳送延遲不能小於0
TpCoolDownShouldBeGreaterThan0: 傳送冷卻時間不能小於0
PriceShouldBeGreaterThan0: 每方塊單價不能小於0
RefundShouldBeGreaterThan0: 領地退款比例不能小於0
SpawnProtectRadiusShouldBeGreaterThan0: 出生點保護半徑不能小於或等於0
Template:
CreateTemplateUsage: '用法: /dominion template create <模板名稱>'
DeleteTemplateUsage: '用法: /dominion template delete <模板名稱>'
@ -257,6 +241,7 @@ Messages:
AutoCleanStart: 開始自動清理長時間未登錄玩家領地數據
AutoCleanPlayer: 已清理玩家 %s 的領地數據
AutoCleanEnd: 自動清理完成
MapInfoDetail: <div>%s</div><div>所有人:%s</div>
TUI:
NotDominionOwnerOrAdminForPage: 你不是領地 %s 的擁有者或管理員,無權訪問此頁面
CommandHelp:
@ -301,8 +286,6 @@ TUI:
MigrateDescription: 把你的領地從Residence遷移到Dominion
AllDominionButton: 所有領地
AllDominionDescription: 查看所有領地
ConfigButton: 系統配置
ConfigDescription: 查看/修改系統配置
ReloadCacheButton: 重載緩存
ReloadCacheDescription: 手動刷新緩存可解決一些玩家操作無效問題,不建議頻繁操作
ReloadConfigButton: 重載配置
@ -415,8 +398,6 @@ TUI:
RemoveButton: 卸下
ApplyButton: 使用
FromDominion: 來自領地:
Config:
Title: Dominion 系統配置
CUI:
Input:
CreateDominion: 輸入要創建的領地名稱
@ -439,8 +420,7 @@ Config:
LimitMinYError: Limit.MinY 不能大於或等於 Limit.MaxY已重置為 -64 320
RefundError: Economy.Refund 設置不合法,已重置為 0.85
PriceError: Economy.Price 設置不合法,已重置為 10.0
LimitSizeYAutoAdjust: 啟用 Limit.Vert 時 Limit.SizeY 不能小於 Limit.MaxY - Limit.MinY已自動調整為
%d
LimitSizeYAutoAdjust: 啟用 Limit.Vert 時 Limit.SizeY 不能小於 Limit.MaxY - Limit.MinY已自動調整為 %d
AmountError: Limit.Amount 設置不合法,已重置為 10
DepthError: Limit.Depth 設置不合法,已重置為 3
GroupMinYError: 權限組 %s 的 MinY 不能大於等於 MaxY已重置為 -64 和 320
@ -457,12 +437,12 @@ Config:
Comment:
Language: 語言設置,參考 languages 文件夾下的文件名
AutoCreateRadius: 自動創建領地的半徑,單位為方塊
NegativeOneDisabled: -1表示不開啟
NegativeOneDisabled: '-1表示不開啟'
DefaultLimit: 默認玩家圈地限製
SpawnProtectRadius: 出生點保護半徑 出生點此範圍內不允許圈地
MinY: 最小Y坐標
MaxY: 最大Y坐標
NegativeOneUnlimited: -1表示不限製
NegativeOneUnlimited: '-1表示不限製'
SizeX: X方向最大長度
SizeY: Y方向最大長度
SizeZ: Z方向最大長度
@ -470,7 +450,6 @@ Config:
Depth: 子領地深度
ZeroDisabled: 0表示不開啟
Vert: 是否自動延伸到 MaxY 和 MinY
DisabledWorlds: 不允許圈地的世界列表
OpBypass: 是否允許OP無視領地限製
TpDelay: 傳送延遲 秒
TpCoolDown: 傳送冷卻 秒
@ -485,8 +464,17 @@ Config:
ResidenceMigration: 是否允許玩家從 Residence 遷移領地數據
GroupTitle: 權限組稱號 - 使用權限組當作稱號(需要PlaceholderAPI插件)
GroupTitleVariable: '變量: %dominion_group_title%'
GroupTitleColor: 前後綴如需要加顏色請使用這種格式 &#ffffff
GroupTitleColor: '前後綴如需要加顏色請使用這種格式 &#ffffff'
PerformanceTimer: 性能測試計時器
GroupLine1: '>---------------------------------<'
GroupLine2: '| 圈地限制特殊權限組配置 |'
GroupLine3: '>---------------------------------<'
GroupLine4: 此文件可以作為模板,你可以將此文件複製後重命名為你想要的
GroupLine5: 權限組名然後修改裡面的配置如果你想給贊助玩家或者VIP
GroupLine6: 一些特殊優惠,例如更少的圈地價格、更大的領地等,你可以在
GroupLine7: 這裡配置。詳細說明參閱以下鏈接:
GroupLine8DocumentAddress: '> https://dominion.lunadeer.cn/%s/operator/privilege.html'
WorldSettings: 單獨設置某個世界的圈地規則(如不設置則使用以上規則)
Flags:
admin:
DisplayName: 管理員
@ -586,7 +574,7 @@ Flags:
Description: 收獲莊稼、作物
honey:
DisplayName: 蜂巢交互
Description: 是否可以蜂蜜
Description: 是否可以蜂蜜
hook:
DisplayName: 使用釣鉤
Description: 是否可以使用釣鉤
@ -687,7 +675,7 @@ Flags:
DisplayName: 雕零生成
Description: 雕零生成以及雕零生成時產生的爆炸
Localization:
LoadLanguageSuccess: 成功加載語言文件 zh-cn
LoadLanguageSuccess: 成功加載語言文件 zh-hk
LoadLanguageFailed: 加載語言文件失敗:%s
LanguageFileNotFound: Language file %s not found, using default zh-cn.
Utils:
@ -727,7 +715,7 @@ Utils:
Reconnecting: 正在嘗試重新連接數據庫
ReconnectionSuccess: 重新連接數據庫成功
ReconnectionFailed: 重新連接數據庫失敗
ErrorTitle: === 嚴重錯誤 ===
ErrorTitle: '=== 嚴重錯誤 ==='
ReconnectionUnexpected: 數據庫連接意外關閉,正在嘗試重新連接
OperationAbort: 操作終止
OperationFailed: '數據庫操作失敗: '

View File

@ -1,6 +1,7 @@
rootProject.name = "Dominion"
include(
"api",
"core",
"v1_20_1",
"v1_21"

View File

@ -3,7 +3,7 @@ plugins {
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
// utf-8
@ -12,6 +12,7 @@ tasks.withType<JavaCompile> {
}
dependencies {
compileOnly(project(":api"))
compileOnly(project(":core"))
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
}

View File

@ -20,8 +20,11 @@ import org.bukkit.event.hanging.HangingBreakEvent;
import org.bukkit.event.inventory.InventoryMoveItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import static cn.lunadeer.dominion.utils.EventUtils.checkFlag;
import static org.bukkit.Material.FARMLAND;
@ -333,7 +336,7 @@ public class EnvironmentEvents implements Listener {
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onHopper(InventoryMoveItemEvent event) {
public void onHopper(InventoryMoveItemEvent event) { // hopper_outside
Inventory hopper = event.getDestination();
Inventory inventory = event.getSource();
DominionDTO hopperDom = Cache.instance.getDominionByLoc(hopper.getLocation());
@ -349,7 +352,7 @@ public class EnvironmentEvents implements Listener {
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockPushedByPiston(BlockPistonExtendEvent event) {
public void onBlockPushedByPiston(BlockPistonExtendEvent event) { // piston_outside
Block piston = event.getBlock();
DominionDTO pistonDom = Cache.instance.getDominionByLoc(piston.getLocation());
BlockFace direction = event.getDirection();
@ -369,4 +372,38 @@ public class EnvironmentEvents implements Listener {
}
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onGravityBlockFalling(EntityChangeBlockEvent event) { // gravity_block
Entity entity = event.getEntity();
if (!(entity instanceof FallingBlock)) {
return;
}
Block block = event.getBlock();
if (event.getTo().isAir()) {
fallingBlockMap.put(entity.getUniqueId(), block.getLocation());
} else {
Location locStart = fallingBlockMap.get(entity.getUniqueId());
if (locStart == null) {
return;
}
fallingBlockMap.remove(entity.getUniqueId());
Location locEnd = block.getLocation();
DominionDTO domStart = Cache.instance.getDominionByLoc(locStart);
DominionDTO domEnd = Cache.instance.getDominionByLoc(locEnd);
if (domEnd == null) {
return;
}
if (domStart != null && domStart.getId().equals(domEnd.getId())) {
return;
}
if (!checkFlag(domEnd, Flag.GRAVITY_BLOCK, null)) {
event.setCancelled(true);
locEnd.getWorld().dropItemNaturally(locEnd, new ItemStack(((FallingBlock) entity).getBlockData().getMaterial()));
entity.remove();
}
}
}
private static final Map<UUID, Location> fallingBlockMap = new java.util.HashMap<>();
}

View File

@ -1,7 +1,9 @@
package cn.lunadeer.dominion.events_v1_20_1;
import cn.lunadeer.dominion.Cache;
import cn.lunadeer.dominion.Dominion;
import cn.lunadeer.dominion.dtos.DominionDTO;
import cn.lunadeer.dominion.managers.Translation;
import cn.lunadeer.dominion.utils.Particle;
import cn.lunadeer.minecraftpluginutils.Notification;
import cn.lunadeer.minecraftpluginutils.VaultConnect.VaultConnect;
@ -41,7 +43,7 @@ public class SelectPointEvents implements Listener {
if (action == Action.LEFT_CLICK_BLOCK) {
event.setCancelled(true);
Notification.info(player, "已选择第一个点: %d %d %d", block.getX(), block.getY(), block.getZ());
Notification.info(player, Translation.Tool_SelectFirstPoint, block.getX(), block.getY(), block.getZ());
Location loc = block.getLocation();
if (Dominion.config.getLimitVert(player)) {
loc.setY(Dominion.config.getLimitMinY(player));
@ -49,7 +51,7 @@ public class SelectPointEvents implements Listener {
points.put(0, loc);
} else if (action == Action.RIGHT_CLICK_BLOCK) {
event.setCancelled(true);
Notification.info(player, "已选择第二个点: %d %d %d", block.getX(), block.getY(), block.getZ());
Notification.info(player, Translation.Tool_SelectSecondPoint, block.getX(), block.getY(), block.getZ());
Location loc = block.getLocation();
if (Dominion.config.getLimitVert(player)) {
loc.setY(Dominion.config.getLimitMaxY(player) - 1);
@ -66,10 +68,10 @@ public class SelectPointEvents implements Listener {
return;
}
if (!points.get(0).getWorld().equals(points.get(1).getWorld())) {
Notification.warn(player, "两个点不在同一个世界");
Notification.warn(player, Translation.Tool_NotSameWorld);
return;
}
Notification.info(player, "已选择两个点,可以使用 /dominion create <领地名称> 创建领地");
Notification.info(player, Translation.Tool_SelectTwoPoints);
Location loc1 = points.get(0);
Location loc2 = points.get(1);
int minX = Math.min(loc1.getBlockX(), loc2.getBlockX());
@ -82,7 +84,7 @@ public class SelectPointEvents implements Listener {
minX, minY, minZ, maxX, maxY, maxZ);
if (Dominion.config.getEconomyEnable()) {
if (!VaultConnect.instance.economyAvailable()) {
Notification.error(player, "计算价格失败,没有可用的经济插件系统,请联系服主。");
Notification.error(player, Translation.Messages_NoEconomyPlugin);
return;
}
int count;
@ -92,13 +94,38 @@ public class SelectPointEvents implements Listener {
count = dominion.getVolume();
}
float price = count * Dominion.config.getEconomyPrice(player);
Notification.info(player, "预计领地创建价格为 %.2f %s", price, VaultConnect.instance.currencyNamePlural());
Notification.info(player, Translation.Tool_CreateDominionPrice, price, VaultConnect.instance.currencyNamePlural());
}
Particle.showBorder(player, dominion);
Notification.info(player, "尺寸: %d x %d x %d", dominion.getWidthX(), dominion.getHeight(), dominion.getWidthZ());
Notification.info(player, "面积: %d", dominion.getSquare());
Notification.info(player, "高度: %d", dominion.getHeight());
Notification.info(player, "体积: %d", dominion.getVolume());
Notification.info(player, Translation.Tool_DominionSize, dominion.getWidthX(), dominion.getHeight(), dominion.getWidthZ());
Notification.info(player, Translation.Tool_DominionSquare, dominion.getSquare());
Notification.info(player, Translation.Tool_DominionHeight, dominion.getHeight());
Notification.info(player, Translation.Tool_DominionVolume, dominion.getVolume());
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void selectBlockToShowInfo(PlayerInteractEvent event) {
Player player = event.getPlayer();
ItemStack item = player.getInventory().getItemInMainHand();
if (item.getType() != Dominion.config.getInfoTool()) {
return;
}
if (event.getAction() != Action.LEFT_CLICK_BLOCK) {
return;
}
event.setCancelled(true);
Block block = event.getClickedBlock();
if (block == null) {
return;
}
DominionDTO dominion = Cache.instance.getDominionByLoc(block.getLocation());
if (dominion == null) {
Notification.info(player, Translation.Tool_LocationNotInDominion, block.getX(), block.getY(), block.getZ());
} else {
Notification.info(player, Translation.Tool_LocationInDominion, block.getX(), block.getY(), block.getZ(), dominion.getName());
Notification.info(player, Translation.Tool_DominionOwner, Cache.instance.getPlayerName(dominion.getOwner()));
}
}
}

View File

@ -12,16 +12,15 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Monster;
import org.bukkit.event.Listener;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import static cn.lunadeer.dominion.utils.EventUtils.checkFlag;
public class Spigot implements Listener {
static {
Map<UUID, Location> entityMap = new HashMap<>();
ConcurrentHashMap<UUID, Location> entityMap = new ConcurrentHashMap<>();
Scheduler.runTaskRepeat(() -> {
Dominion.instance.getServer().getWorlds().forEach(world -> {
world.getEntities().forEach(entity -> {

View File

@ -12,6 +12,7 @@ tasks.withType<JavaCompile> {
}
dependencies {
compileOnly(project(":api"))
compileOnly(project(":core"))
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
}

View File

@ -19,8 +19,11 @@ import org.bukkit.event.hanging.HangingBreakEvent;
import org.bukkit.event.inventory.InventoryMoveItemEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import static cn.lunadeer.dominion.utils.EventUtils.checkFlag;
import static org.bukkit.Material.FARMLAND;
@ -329,7 +332,7 @@ public class EnvironmentEvents implements Listener {
@EventHandler(priority = EventPriority.HIGHEST)
public void onHopper(InventoryMoveItemEvent event) {
public void onHopper(InventoryMoveItemEvent event) { // hopper_outside
Inventory hopper = event.getDestination();
Inventory inventory = event.getSource();
DominionDTO hopperDom = Cache.instance.getDominionByLoc(hopper.getLocation());
@ -345,7 +348,7 @@ public class EnvironmentEvents implements Listener {
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockPushedByPiston(BlockPistonExtendEvent event) {
public void onBlockPushedByPiston(BlockPistonExtendEvent event) { // piston_outside
Block piston = event.getBlock();
DominionDTO pistonDom = Cache.instance.getDominionByLoc(piston.getLocation());
BlockFace direction = event.getDirection();
@ -365,4 +368,38 @@ public class EnvironmentEvents implements Listener {
}
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onGravityBlockFalling(EntityChangeBlockEvent event) { // gravity_block
Entity entity = event.getEntity();
if (!(entity instanceof FallingBlock)) {
return;
}
Block block = event.getBlock();
if (event.getTo().isAir()) {
fallingBlockMap.put(entity.getUniqueId(), block.getLocation());
} else {
Location locStart = fallingBlockMap.get(entity.getUniqueId());
if (locStart == null) {
return;
}
fallingBlockMap.remove(entity.getUniqueId());
Location locEnd = block.getLocation();
DominionDTO domStart = Cache.instance.getDominionByLoc(locStart);
DominionDTO domEnd = Cache.instance.getDominionByLoc(locEnd);
if (domEnd == null) {
return;
}
if (domStart != null && domStart.getId().equals(domEnd.getId())) {
return;
}
if (!checkFlag(domEnd, Flag.GRAVITY_BLOCK, null)) {
event.setCancelled(true);
locEnd.getWorld().dropItemNaturally(locEnd, new ItemStack(((FallingBlock) entity).getBlockData().getMaterial()));
entity.remove();
}
}
}
private static final Map<UUID, Location> fallingBlockMap = new java.util.HashMap<>();
}

View File

@ -7,6 +7,7 @@ import cn.lunadeer.dominion.dtos.PlayerDTO;
import cn.lunadeer.minecraftpluginutils.Common;
import cn.lunadeer.minecraftpluginutils.Notification;
import cn.lunadeer.minecraftpluginutils.Teleport;
import com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Tag;
@ -790,6 +791,19 @@ public class PlayerEvents implements Listener {
checkFlag(dom, Flag.SHOOT, player, event);
}
@EventHandler(priority = EventPriority.HIGHEST) // shoot - wind_charge knock back
public void onWindChargeKnockBack(EntityKnockbackByEntityEvent event) {
Entity entity = event.getHitBy();
if (!(entity instanceof WindCharge windCharge)) {
return;
}
if (!(windCharge.getShooter() instanceof Player player)) {
return;
}
DominionDTO dom = Cache.instance.getDominionByLoc(windCharge.getLocation());
checkFlag(dom, Flag.SHOOT, player, event);
}
@EventHandler(priority = EventPriority.HIGHEST) // trade
public void onTrade(InventoryOpenEvent event) {
if (event.getInventory().getType() != InventoryType.MERCHANT) {

View File

@ -1,7 +1,9 @@
package cn.lunadeer.dominion.events_v1_21;
import cn.lunadeer.dominion.Cache;
import cn.lunadeer.dominion.Dominion;
import cn.lunadeer.dominion.dtos.DominionDTO;
import cn.lunadeer.dominion.managers.Translation;
import cn.lunadeer.dominion.utils.Particle;
import cn.lunadeer.minecraftpluginutils.Notification;
import cn.lunadeer.minecraftpluginutils.VaultConnect.VaultConnect;
@ -41,7 +43,7 @@ public class SelectPointEvents implements Listener {
if (action == Action.LEFT_CLICK_BLOCK) {
event.setCancelled(true);
Notification.info(player, "已选择第一个点: %d %d %d", block.getX(), block.getY(), block.getZ());
Notification.info(player, Translation.Tool_SelectFirstPoint, block.getX(), block.getY(), block.getZ());
Location loc = block.getLocation();
if (Dominion.config.getLimitVert(player)) {
loc.setY(Dominion.config.getLimitMinY(player));
@ -49,7 +51,7 @@ public class SelectPointEvents implements Listener {
points.put(0, loc);
} else if (action == Action.RIGHT_CLICK_BLOCK) {
event.setCancelled(true);
Notification.info(player, "已选择第二个点: %d %d %d", block.getX(), block.getY(), block.getZ());
Notification.info(player, Translation.Tool_SelectSecondPoint, block.getX(), block.getY(), block.getZ());
Location loc = block.getLocation();
if (Dominion.config.getLimitVert(player)) {
loc.setY(Dominion.config.getLimitMaxY(player) - 1);
@ -66,10 +68,10 @@ public class SelectPointEvents implements Listener {
return;
}
if (!points.get(0).getWorld().equals(points.get(1).getWorld())) {
Notification.warn(player, "两个点不在同一个世界");
Notification.warn(player, Translation.Tool_NotSameWorld);
return;
}
Notification.info(player, "已选择两个点,可以使用 /dominion create <领地名称> 创建领地");
Notification.info(player, Translation.Tool_SelectTwoPoints);
Location loc1 = points.get(0);
Location loc2 = points.get(1);
int minX = Math.min(loc1.getBlockX(), loc2.getBlockX());
@ -82,7 +84,7 @@ public class SelectPointEvents implements Listener {
minX, minY, minZ, maxX, maxY, maxZ);
if (Dominion.config.getEconomyEnable()) {
if (!VaultConnect.instance.economyAvailable()) {
Notification.error(player, "计算价格失败,没有可用的经济插件系统,请联系服主。");
Notification.error(player, Translation.Messages_NoEconomyPlugin);
return;
}
int count;
@ -92,13 +94,38 @@ public class SelectPointEvents implements Listener {
count = dominion.getVolume();
}
float price = count * Dominion.config.getEconomyPrice(player);
Notification.info(player, "预计领地创建价格为 %.2f %s", price, VaultConnect.instance.currencyNamePlural());
Notification.info(player, Translation.Tool_CreateDominionPrice, price, VaultConnect.instance.currencyNamePlural());
}
Particle.showBorder(player, dominion);
Notification.info(player, "尺寸: %d x %d x %d", dominion.getWidthX(), dominion.getHeight(), dominion.getWidthZ());
Notification.info(player, "面积: %d", dominion.getSquare());
Notification.info(player, "高度: %d", dominion.getHeight());
Notification.info(player, "体积: %d", dominion.getVolume());
Notification.info(player, Translation.Tool_DominionSize, dominion.getWidthX(), dominion.getHeight(), dominion.getWidthZ());
Notification.info(player, Translation.Tool_DominionSquare, dominion.getSquare());
Notification.info(player, Translation.Tool_DominionHeight, dominion.getHeight());
Notification.info(player, Translation.Tool_DominionVolume, dominion.getVolume());
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void selectBlockToShowInfo(PlayerInteractEvent event) {
Player player = event.getPlayer();
ItemStack item = player.getInventory().getItemInMainHand();
if (item.getType() != Dominion.config.getInfoTool()) {
return;
}
if (event.getAction() != Action.LEFT_CLICK_BLOCK) {
return;
}
event.setCancelled(true);
Block block = event.getClickedBlock();
if (block == null) {
return;
}
DominionDTO dominion = Cache.instance.getDominionByLoc(block.getLocation());
if (dominion == null) {
Notification.info(player, Translation.Tool_LocationNotInDominion, block.getX(), block.getY(), block.getZ());
} else {
Notification.info(player, Translation.Tool_LocationInDominion, block.getX(), block.getY(), block.getZ(), dominion.getName());
Notification.info(player, Translation.Tool_DominionOwner, Cache.instance.getPlayerName(dominion.getOwner()));
}
}
}

View File

@ -12,16 +12,15 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Monster;
import org.bukkit.event.Listener;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import static cn.lunadeer.dominion.utils.EventUtils.checkFlag;
public class Spigot implements Listener {
static {
Map<UUID, Location> entityMap = new HashMap<>();
ConcurrentHashMap<UUID, Location> entityMap = new ConcurrentHashMap<>();
Scheduler.runTaskRepeat(() -> {
Dominion.instance.getServer().getWorlds().forEach(world -> {
world.getEntities().forEach(entity -> {