HerePunchy
一款高级 Paper Minecraft 插件,用于自动攻击和自动防御的战斗巡逻——自动遍历玩家定义的矩形区域,扫描并绕过危险源(岩浆、水、火焰、墙壁),使用可配置的武器列表(Bow、Crossbow、Trident、Sword、Axe、Mace)优先进行攻击,用盾牌自动防御投射物,进食以维持生命值,补充装备,并存放生物掉落物!
功能特性
- 区域选择 — 手持任意 Sword 时 Shift+右键点击,设置战斗巡逻区域的两个角点(Point A 和 Point B)。
- 区域扫描 — 设置 Point B 后,将扫描边界并将其分类为可通过区域、危险源(岩浆、火焰、岩浆块、水)或障碍物。危险源会被安全避开。
- 反向遍历与重新扫描 — 从 Point A 走到 Point B。到达 B 点后,按 反向路径点顺序 走回 A,并在每端重新扫描区域以适应变化。
- 智能武器选择 — 动态装备自定义序列中优先级最高的可用武器。
- 远程战斗瞄准 — 向远处的生物发射箭矢或投掷三叉戟(最远 20 格),包括模拟拉弓动作。
- 主动护盾防御 — 在主手未挥击/射击时,副手举起盾牌以防止突袭。
- 正面伤害监听 — 自定义监听器确保取消来自箭矢或近战攻击的正面伤害,消耗耐久度,并触发盾牌格挡效果。
- 武器耐久保护 — 当武器耐久低于 5 时自动切换到备用武器,防止其损坏。
- 低饥饿/生命进食 — 扫描背包寻找食物,在饥饿值或生命值下降时食用,恢复饱和度并暂停其他任务 1.6 秒。
- 向导配置箱子 — 设置备用武器补给箱和战利品投放箱。
- 初始装备保护 — 启动时记录你的初始背包;这些物品被标记为 protected(受保护),永远不会被放入战利品箱。
- 自动防御模式聊天警报 — 如果所有首选武器和备用弹药完全耗尽,将在聊天中发送警报消息,并激活徒手/工具战斗。
- 离线清理 — 玩家断开连接时自动清除玩家状态并停止任务。
- AuraSkills 集成 — 在战斗动作发生后立即授予 AuraSkills Fighting(近战)、Archery(远程)和 Defense(受到伤害 / 格挡)经验值,尊重智慧加成和缩放属性。
- HereRolePlay 集成 — 击败怪物和在巡逻中受伤时,直接将战斗经验点数授予玩家,帮助提升 Warrior、Paladin 和 Necromancer 职业等级。
命令
所有命令都可以使用 /hp 代替 /herepunchy。
| 命令 |
描述 |
权限 |
/herepunchy start (或 /hp start) |
在你选择的区域开始战斗巡逻 |
herepunchy.use |
/herepunchy stop (或 /hp stop) |
停止巡逻 |
herepunchy.use |
/herepunchy restart (或 /hp restart) |
从上次暂停的路径点继续巡逻 |
herepunchy.use |
/herepunchy clear (或 /hp clear) |
清除选择、地图扫描和配置箱子 |
herepunchy.use |
/herepunchy setup (或 /hp setup) |
启动配置向导以设置武器和战利品箱子 |
herepunchy.setup |
/herepunchy config (或 /hp config) |
打开武器优先级 GUI 以重新排序偏好 |
herepunchy.config |
/herepunchy select (或 /hp select) |
切换剑坐标选择模式 |
herepunchy.use |
权限
| 权限 |
描述 |
默认值 |
herepunchy.use |
允许使用 /herepunchy 命令 |
true |
herepunchy.setup |
允许使用箱子容器配置向导 |
true |
herepunchy.config |
允许使用武器优先级配置 UI |
true |
要求
- Paper 1.21+ 服务器
- Java 21+
- (可选)AuraSkills 2.x
- (可选)HereRolePlay
使用方法
基本巡逻设置
- 运行
/herepunchy select 激活选择模式。
- 在主手中持有任意 Sword。
- Shift+右键点击一个方块以设置 Point A。
- Shift+右键点击另一个方块以设置 Point B。区域将被扫描,你将看到摘要信息。
- 运行
/herepunchy start 开始自动巡逻和保护边界!
高级用法:配置箱子
配置向导允许你设置武器补给和战利品箱子:
- 运行
/herepunchy setup 启动向导。
- 右键点击一个容器(例如 Chest)以设置你的 Backup Weapons chest(备用武器箱)。
- 右键点击另一个容器以设置你的 Loot Drop-off chest(战利品投放箱)。
- 将备用武器(swords, bows, arrows, food, shields)放入武器箱。
- 启动
/herepunchy start。机器人会在耗尽时自动走向武器箱补充,并在满仓时走向战利品箱。
高级用法:武器优先级 UI
配置你偏好的攻击武器顺序:
- 运行
/herepunchy config 打开武器优先级 GUI。
- 你会看到 6 个武器图标位于插槽中。
- 左击武器将其优先级 UP(上移)。
- 右击武器将其优先级 DOWN(下移)。
- 战斗时,机器人将从列表中动态选择第一个可用的武器。
从源码构建
使用 Gradle 构建:
./gradlew build
打包后的 JAR 文件位于 build/libs/HerePunchy-1.2.2.jar。
许可证
本项目遵循 GNU General Public License v3.0 许可协议。
HerePunchy
A premium Paper Minecraft plugin for auto-attack and auto-defense combat patrols — automatically traverse a player-defined rectangular area, scan and navigate around hazards (lava, water, fire, walls), prioritize attacks using a configurable weapon list (Bow, Crossbow, Trident, Sword, Axe, Mace), auto-defend from incoming projectiles with shields, eat food to sustain health, restock gear, and deposit mob loot!
Features
- Area selection — Shift-right-click with any Sword to set two corners (Point A and Point B) of your combat patrol zone.
- Area scanning — After setting Point B, the perimeter is scanned and classified as passable, hazards (lava, fire, magma, water), or obstructed. Hazards are safely bypassed.
- Reverse Traversal & Rescan — Walks from Point A to Point B. Once B is reached, walks backwards to A in reverse waypoint order, re-scanning the zone at each end to adapt to changes.
- Smart weapon selection — Dynamically equips the highest priority available weapon from your custom sequence.
- Ranged Combat aiming — Fires arrows or throws tridents at distant mobs (up to 20 blocks away), including drawing bow simulations.
- Active Shielding — Holds a shield raised in your offhand to protect you from surprise attacks whenever you are not swinging/shooting.
- Frontal block listener — Custom listener ensures that frontal damage from arrows or melee hits is cancelled, durability is damaged, and shield block effects are triggered.
- Weapon Durability Safety — Automatically switches to alternative weapons when a weapon's durability falls below 5 to prevent it from breaking.
- Low Hunger/Health Eating — Scans inventory for food and eats it when hunger or health drops, restoring saturation and pausing other tasks for 1.6s.
- Wizard Setup Chests — Set backup weapon restocking chests and loot drop-off chests.
- Starting Gear Protection — Records your initial inventory at startup; these items are marked as protected and will never be dumped into the loot box.
- Auto-Defense Mode Chat Alerts — If all preferred weapons and backup ammo are completely depleted, sends an alert message in chat and activates bare fist/tool fighting.
- Offline cleanup — Automatically clears player states and stops tasks when they disconnect.
- AuraSkills Integration — Automatically awards AuraSkills Fighting (melee), Archery (ranged), and Defense (damage taken / blocked) XP immediately upon combat actions, respecting wisdom and scaling stats.
- HereRolePlay Integration — Automatically awards Combat experience points directly to the player for defeating monsters and taking damage in patrols, helping level up Warrior, Paladin, and Necromancer classes.
Commands
All commands can be run with /hp instead of /herepunchy.
| Command |
Description |
Permission |
/herepunchy start (or /hp start) |
Start combat patrolling in your selected area |
herepunchy.use |
/herepunchy stop (or /hp stop) |
Stop patrolling |
herepunchy.use |
/herepunchy restart (or /hp restart) |
Resume patrolling from the last paused waypoint |
herepunchy.use |
/herepunchy clear (or /hp clear) |
Clear selections, map scans, and setup chests |
herepunchy.use |
/herepunchy setup (or /hp setup) |
Start the setup wizard to configure weapons and loot chests |
herepunchy.setup |
/herepunchy config (or /hp config) |
Open the weapon priority GUI to reorder preferences |
herepunchy.config |
/herepunchy select (or /hp select) |
Toggle sword coordinates selection mode |
herepunchy.use |
Permissions
| Permission |
Description |
Default |
herepunchy.use |
Allows use of the /herepunchy commands |
true |
herepunchy.setup |
Allows use of the chest container setup wizard |
true |
herepunchy.config |
Allows use of the weapon priority config UI |
true |
Requirements
- Paper 1.21+ server
- Java 21+
- (Optional) AuraSkills 2.x
- (Optional) HereRolePlay
How to Use
Basic Patrol Setup
- Run
/herepunchy select to active selection mode.
- Hold any Sword in your main hand.
- Shift-right-click a block to set Point A.
- Shift-right-click another block to set Point B. The area will be scanned and you will see a summary.
- Run
/herepunchy start to begin auto-patrolling and defending the perimeter!
Advanced Usage: Setup Chests
The setup wizard allows you to configure weapon restock and loot chests:
- Run
/herepunchy setup to start the wizard.
- Right-click a container (e.g. Chest) to set your Backup Weapons chest.
- Right-click another container to set your Loot Drop-off chest.
- Drop backup weapons (swords, bows, arrows, food, shields) into the weapons chest.
- Launch
/herepunchy start. The bot will automatically walk to the weapons chest to replenish if depleted, and walk to the loot chest when full.
Advanced Usage: Weapon Priority UI
Configure the order of weapons you prefer to attack with:
- Run
/herepunchy config to open the weapon priority GUI.
- You will see 6 weapon icons in slots.
- Left-click a weapon to move it UP in priority.
- Right-click a weapon to move it DOWN in priority.
- The bot will dynamically select the first available weapon in your list when fighting.
Building from Source
Build using Gradle:
./gradlew build
The packaged JAR will be located at build/libs/HerePunchy-1.2.2.jar.
License
This project is licensed under the GNU General Public License v3.0.
评论 0
登录后参与评分
还没有评论,来抢沙发吧