TSLzone - 区域伤害插件
TSLzone 是一款专为 Folia 1.21+ 服务器设计的区域伤害插件,允许服务器管理员创建指定区域,并根据设定的伤害值和频率持续对区域内的实体造成伤害。
✨ 特性
- ? 精确的区域控制 - 通过点选系统准确定义伤害区域
- ⚡ 兼容 Folia - 针对 Folia 1.21+ 服务端进行了优化,支持多线程架构
- ? 灵活的配置 - 可自定义伤害值和伤害频率
- ? 数据持久化 - 所有区域配置自动保存,重启服务器后自动恢复
- ?️ 安全限制 - 区域大小限制以防止影响服务器性能
- ? 消息自定义 - 完全可自定义的消息系统
- ? 热重载 - 支持在不重启服务器的情况下重载配置文件
? 快速开始
安装步骤
- 下载
TSLzone-1.0.jar 插件文件
- 将插件文件放入服务器的
plugins 文件夹中
- 重启服务器或使用
plugman 加载插件
- 插件将自动生成配置文件
基本使用流程
- 设置点位选择 - 使用
/tzone pos1 和 /tzone pos2 设置区域的两个对角点
- 创建区域 - 使用
/tzone create <region name> <damage> <tick> 创建一个区域
- 启动区域 - 使用
/tzone start <region name> 开始对区域内实体造成伤害
- 管理区域 - 使用各种命令来管理已创建的区域
? 命令详情
基本命令
- 主命令:
/tslzone 或 /tzone
- 权限:
tslzone.use(基本使用) / tslzone.admin(管理功能)
选择命令
/tzone pos1 # 设置选区中的第一个点(当前玩家位置)
/tzone pos2 # 设置选区中的第二个点(当前玩家位置)
区域管理命令
/tzone create <region name> <damage value> <frequency> # 创建新区域
/tzone start <region name> # 开始对指定区域造成伤害
/tzone stop <region name> # 停止对指定区域造成伤害
/tzone remove <region name> # 删除指定区域
/tzone list # 列出所有区域及其状态
系统命令
/tzone reload # 重新加载所有配置文件
/tzone help # 显示帮助信息
? 使用示例
创建一个伤害区域
- 首先移动到该区域的一个角落,并执行:
/tzone pos1
2. 然后移动到该区域的对角位置,并执行:
/tzone pos2
3. 创建一个区域(命名为 "danger_zone",每次造成 2 点伤害,每 5 秒执行一次):
/tzone create danger_zone 2 5
4. 启动该区域:
/tzone start danger_zone
现在,任何进入该区域的生物都将每 5 秒受到 2 点伤害!
### 管理现有区域
- 查看所有区域:
/tzone list
- 临时停止一个区域:
/tzone stop danger_zone
- 重新启动区域:
/tzone start danger_zone
- 彻底删除区域:
/tzone remove danger_zone
## ⚙️ 配置文件
### data.yml
区域数据会自动保存在 `plugins/TSLzone/data.yml` 中,包括:
- 区域坐标信息
- 伤害设置
- 频率设置
- 激活状态
示例配置:
```yaml
zones:
danger_zone:
pos1:
world: world
x: 100.0
Y: 64.0
from: 200.0
pos2:
world: world
x: 150.0
and: 80.0
from: 250.0
damage: 2.0
frequency: 5
active: true
messages.yml
自定义所有插件消息,支持颜色代码:
# 颜色代码: &0-&9, &a-&f, &l(加粗), &o(斜体), &n(下划线), &m(删除线), &k(随机字符), &r(重置)
zone:
create:
success: "&a 成功创建了区域 &e'%s' &a!"
success-info: "&e 伤害: &7%s &e| 频率: &7%s 秒"
? 权限系统
| 权限节点 |
描述 |
默认值 |
tslzone.use |
基本使用权限(pos1、pos2、list) |
OP |
tslzone.admin |
管理员权限(create、start、stop、remove、reload) |
OP |
权限配置示例 (LuckPerms)
# 为玩家授予基本权限
/lp user <玩家名称> permission set tslzone.use true
# 赋予管理员完全权限
`/lp user <admin> permission set tslzone.admin true`
## ?️ 安全与限制
### 区域大小限制
- **最大区域**:500×500×500 方块
- **目的**:防止过大的区域影响服务器性能
- **检查时机**:在创建区域时自动检查
### 性能优化
- 使用 Folia 的区域调度器以确保线程安全
- 智能实体检测,仅处理区域内的生物
- 异常处理机制,防止插件崩溃
## ? 故障排除
### 常见问题
**Q:创建区域失败,提示“区域过大”**
A:请确保所选区域未超过 500×500×500 方块。可使用 `/tzone list` 检查区域大小。
**Q:区域内没有造成伤害**
A:检查区域是否已启用(通过 `/tzone list` 查看状态),并确保区域内存在生物实体。
**Q:服务器重启后区域消失**
A:检查 `plugins/TSLzone/data.yml` 文件是否存在且可读可写。
**Q:命令无权限**
A:请确保拥有 `tslzone.use` 或 `tslzone.admin` 权限。
### 调试信息
启用调试模式以查看详细日志:
1. 查看服务器控制台输出
2. 检查插件是否正确加载
3. 使用 `/tzone reload` 重新加载配置
## ? 更新日志
### V1.0.0
- ✨ 初始版本发布
- ✅ 完整的区域管理系统
- ✅ 完全兼容 Folia 1.21+
- ✅ 可自定义的消息系统
- ✅ 数据持久化支持
## ? 支持与反馈
如果您在使用过程中遇到问题或有改进建议,请:
1. 查阅本文档的故障排除部分
2. 确保您正在使用 Folia 1.21+ 服务器
3. 联系插件开发者以报告问题
## ? 许可证
本插件受 MIT 许可证约束,可免费使用、修改和分发。
---
**感谢您使用 TSLzone! ** ?
*让您的服务器区域管理更简单、更高效! *
TSLzone - Regional Damage Plugin
TSLzone is a zone damage plug-in designed for Folia 1.21+ servers, allowing server administrators to create designated areas to continuously damage entities within the area according to the set damage value and frequency.
✨ Features
- ? Precise area control - Accurately define damage areas through point selection system
- ⚡ Folia compatible - Optimized for Folia 1.21+ server side, supporting multi-threaded architecture
- ? Flexible configuration - Customizable damage value and damage frequency
- ? Data persistence - All regional configurations are automatically saved, and the server will be automatically restored after restarting
- ?️ Security Limit - Area size limits prevent server performance issues
- ? Message Customization - A fully customizable message system
- ? Hot reload - Supports configuration file hot reload without restarting the server
? Quick start
Installation steps
- download
TSLzone-1.0.jarPlugin Files
- Put the plugin file into the server
pluginsFolders
- Restart the server or use
plugmanLoading plugins
- The plugin will automatically generate configuration files
Basic usage process
- Set the point selection - Use
/tzone pos1and/tzone pos2Set two diagonal points of the area
- Create a zone - Use
/tzone create <region name> <damage> <tick>Create a region
- Startup area - Use
/tzone start <region name>Begins to cause harm to entities in the area
- Manage Zones - Use various commands to manage created zones
? Command details
Basic commands
- Main Command:
/tslzoneor/tzone
- Permissions:
tslzone.use(Basic use) /tslzone.admin(Management function)
Select a command
/tzone pos1 # Set the first point in the selection (current player position)
/tzone pos2 # Set the second point in the selection (current player position)
Regional Management Commands
/tzone create <region name> <damage value> <frequency> # Create a new area
/tzone start <region name> # Start damage to the specified area
/tzone stop <region name> # Stop damage in the specified area
/tzone remove <region name> # Delete the specified region
/tzone list # List all regions and their status
System Commands
/tzone reload # Reload all configuration files
/tzone help # Show help information
? Example of usage
Create a damage area
- First move to a corner of the area and execute:
/tzone pos1
2. Move to the diagonal position of the area and perform:
/tzone pos2
3. Create a zone (named "danger_zone", causing 2 damage every time, execution every 5 seconds):
/tzone create danger_zone 2 5
4. Startup area:
/tzone start danger_zone
Now, any creature entering the area will take 2 damage every 5 seconds!
### Manage existing areas
- View all areas:
/tzone list
- Temporarily stop an area:
/tzone stop danger_zone
- Restart the area:
/tzone start danger_zone
- Completely delete the area:
/tzone remove danger_zone
## ⚙️ Configuration file
### data.yml
The area data is automatically saved in`plugins/TSLzone/data.yml`Includes:
- Regional coordinate information
- Damage settings
- Frequency settings
- Activation status
Sample configuration:
```yaml
zones:
danger_zone:
pos1:
world: world
x: 100.0
Y: 64.0
from: 200.0
pos2:
world: world
x: 150.0
and: 80.0
from: 250.0
damage: 2.0
frequency: 5
active: true
messages.yml
Customize all plugin messages, support color code:
# Color codes: &0-&9, &a-&f, &l(bold), &o(italics), &n(underline), &m(strike line), &k(obfuscation), &r(reset)
zone:
create:
success: "&a created the region successfully &e'%s' &a!"
success-info: "&e damage: &7%s &e| Frequency: &7%s seconds"
? Permission system
| Permission Node |
Description |
Default |
tslzone.use |
Basic usage permissions (pos1, pos2, list) |
OP |
tslzone.admin |
Administrator permissions (create, start, stop, remove, reload) |
OP |
Permission Configuration Example (LuckPerms)
# Give players basic permissions
/lp user <player name> permission set tslzone.use true
# Give the administrator full permissions
/lp user <admin> permission set tslzone.admin true
?️ Safety and Restrictions
Area size limit
- Maximum area: 500×500×500 blocks
- Purpose: Prevent excessively large areas from affecting server performance
- Check timing: Automatically check when zone creation
Performance optimization
- Use Folia's zone scheduler to ensure thread safety
- Intelligent entity detection, only deal with organisms in the area
- Exception handling mechanism to prevent plug-in from crashing
? Troubleshooting
Frequently Asked Questions
Q: Failed to create the area, prompting "the area is too big"
A: Make sure that the selected area does not exceed 500×500×500 blocks. Available/tzone listCheck the area size.
Q: No harm is caused in the area
A: Check whether the area is started (/tzone listCheck the status), ensure there are biological entities in the area.
Q: The area disappears after the server restart
A: Checkplugins/TSLzone/data.ymlWhether the file exists and is readable and writeable.
Q: The command has no permissions
A: Make sure to have ittslzone.useortslzone.adminPermissions.
Debugging information
Enable debug mode to view detailed logs:
- View server console output
- Check if the plugin is loading correctly
- use
/tzone reloadReload configuration
? Update log
V1.0.0
- ✨ Initial Version Release
- ✅ Complete regional management system
- ✅ Folia 1.21+ is fully compatible
- ✅ Customizable message system
- ✅ Data persistence support
? Support and feedback
If you have problems or suggestions for improvement during use, please:
- Check the troubleshooting section of this document
- Make sure you are using Folia 1.21+ server
- Contact the plugin developer to report the problem
? License
This plug-in is subject to the MIT license and is free to use, modify and distribute.
**Thanks for using TSLzone! ** ?
*Make your server area management simpler and more efficient! *
评论 0
登录后参与评分
还没有评论,来抢沙发吧