PvPRequest 插件文档
概述
PvPRequest 是一款适用于 Paper 服务器(版本 1.21.5)的 Minecraft 插件,它允许玩家向其他玩家发起 PvP 决斗挑战。当挑战被接受后,两名玩家将被传送至竞技场内的指定位置,并在决斗结束后返回各自原本的位置。
安装
- 下载插件 JAR 文件 (pvprequest-1.0-SNAPSHOT.jar)
- 将 JAR 文件放入服务器的
plugins 目录中
- 启动或重启您的服务器
- 使用
/pvppos1 和 /pvppos2 命令设置竞技场位置
玩家命令
命令用法
/pvpreq 向另一名玩家发送 PvP 请求,例如:/pvpreq Steve
/pvpyes 接受传入的 PvP 请求,例如:/pvpyes
/pvpno 拒绝传入的 PvP 请求,例如:/pvpno
管理员命令
| 命令 |
描述 |
权限 |
用法 |
| /pvppos1 |
设置竞技场中发起请求玩家的出生点位置 |
pvprequest.admin |
/pvppos1 |
| /pvppos2 |
设置竞技场中接受请求玩家的出生点位置 |
pvprequest.admin |
/pvppos2 |
[这两个命令仅可由 OP(拥有最高权限者)编辑,正确设置它们是至关重要的步骤,否则双方将被传送到出生点 (0,64,0) 进行战斗]
功能
请求系统:玩家可以向其他在线玩家发送 PvP 请求
接受/拒绝:接收方可以选择接受或拒绝传入的请求
时间限制:请求在 60 秒后自动过期(可在 config.yml 中修改此设置)
独立出生点:每位玩家在竞技场中的指定位置出生
位置保留:决斗结束后,玩家将返回到他们原本的位置
决斗追踪:记录活跃的决斗以防止同时存在多个未处理的请求
退出处理:如果玩家在决斗期间退出,对手将被宣布为获胜者
工作流程
玩家 A 使用 /pvpreq 向玩家 B 发送 PvP 请求
玩家 B 收到通知,并可选择接受 (/pvpyes) 或拒绝 (/pvpno)
如果被接受,玩家 A 将被传送至位置 1,玩家 B 将被传送至位置 2
当其中一名玩家死亡后,两人均返回其原本的位置
服务器广播决斗的获胜者
权限
pvprequest.admin - 用于使用 /pvppos1 和 /pvppos2 命令所需
配置
当使用 /pvppos1 和 /pvppos2 设置时,插件会自动保存两个竞技场位置。无需手动配置。
设置竞技场位置
前往您希望挑战者(请求发送者)出生的位置
使用命令 /pvppos1 设置位置 1
前往您希望对手(请求接受者)出生的位置
使用命令 /pvppos2 设置位置 2
故障排除
位置未设置:如果玩家收到“PvP 竞技场位置尚未设置!”的消息,管理员需要使用 /pvppos1 和 /pvppos2 命令
权限:确保管理员拥有 pvprequest.admin 权限以设置竞技场位置
玩家未找到:请确保在发送请求时输入了准确的玩家名称
多重请求:玩家一次只能有一个待处理的请求
技术说明
插件在内存中存储玩家位置,并在决斗结束后将玩家返回至这些位置
两个竞技场位置均存储在插件的 config.yml 文件中
待处理的请求在 60 秒后超时
插件会处理决斗期间的玩家断开连接情况
局限性
目前仅支持 1v1 决斗
一次只能设置一对位置
不保留玩家物品栏或状态效果
未来改进
支持多个竞技场,
团队决斗,
竞技场选择选项,
统计数据追踪,
物品栏保留选项,
PvPRequest Plugin Documentation
Overview
PvPRequest is a Minecraft plugin for Paper servers (version 1.21.5) that allows players to challenge each other to PvP duels. When a challenge is accepted, both players are teleported to designated positions in the arena and returned to their original locations after the duel ends.
Installation
1.Download the plugin JAR file (pvprequest-1.0-SNAPSHOT.jar)
2.Place the JAR file in your server's plugins directory
3.Start or restart your server
4.Set up the arena positions using the /pvppos1 and /pvppos2 commands
Commands For Players Command Usage
/pvpreq Send a PvP request to another player eg: /pvpreq Steve
/pvpyes Accept an incoming PvP request eg:/pvpyes
/pvpno Decline an incoming PvP request eg:/pvpno
For Admins CommandDescriptionPermissionUsage
/pvppos1Set the position for the player who sends the request at arena (pvprequest.admin) /pvppos2Set the position for the player who accepts the request at arena (pvprequest.admin)
[These two command are editable by the op only and seeting it up is a crucial step Else, both players will be teleported to the spawn (0,64,0) to fight]
Features
Request System: Players can send PvP requests to other online players Accept/Decline: Recipients can accept or decline incoming requests Time Limit: Requests automatically expire after 60 seconds (change this in config.yml) Separate Spawn Positions: Each player spawns at their own designated position in the arena Location Preservation: Players are returned to their original locations after the duel Duel Tracking: Tracks active duels to prevent multiple simultaneous requests Quitting Handling: If a player quits during a duel, the opponent is declared the winner
Workflow
Player A sends a PvP request to Player B using /pvpreq Player B receives a notification with options to accept /pvpyes or decline /pvpno If accepted, Player A is teleported to position 1 and Player B to position 2 After one player dies, both are returned to their original locations The server broadcasts the winner of the duel
##P ermissions
pvprequest.admin - Required to use the /pvppos1 and /pvppos2 commands
Configuration The plugin automatically saves both arena positions when set with /pvppos1 and /pvppos2. No manual configuration is needed. Setting Up Arena Positions
Go to the location where you want the challenger (request sender) to spawn Use the command /pvppos1 to set position 1 Go to the location where you want the opponent (request acceptor) to spawn Use the command /pvppos2 to set position 2
Troubleshooting
Positions not set: If players receive "The PvP arena positions have not been set up yet!" message, an admin needs to use both /pvppos1 and /pvppos2 Permissions: Make sure the admin has the pvprequest.admin permission to set arena positions Player not found: Ensure you're typing the exact player name when sending a request Multiple requests: A player can only have one pending request at a time
Technical Notes
The plugin stores player locations in memory and returns players to these locations after duels Both arena positions are stored in the plugin's config.yml file Pending requests timeout after 60 seconds The plugin handles player disconnects during duels
Limitations
Currently only supports 1v1 duels Only one pair of positions can be set at a time Does not preserve player inventory or status effects
Future Improvements
Multiple arena support ,
Team duels,
Arena selection options ,
Statistics tracking ,
Inventory preservation options,
评论 0
登录后参与评分
还没有评论,来抢沙发吧