Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
TurretPlugin is a plugin for PaperMC 1.20.x / 1.21.x that adds automatic turrets to your Minecraft server.
TurretPlugin
TurretPlugin is a plugin for PaperMC 1.20.x / 1.21.x that adds automatic turrets to your Minecraft server — with no mods required! Turrets protect your area by automatically targeting and shooting hostile mobs that are in direct line of sight. They’re crafted and placed like regular Minecraft items, and can be removed individually by players.
🚀 Features
- Craftable "Turret Core" item (see recipe below)
- Place turrets by right-clicking a block with the "Turret Core"
- Turrets automatically aim and shoot only at hostile mobs, if they are in direct line of sight (won’t shoot through walls)
- Turrets are immovable and immune to explosions or fire
- Break a turret by hitting it (only the targeted turret is removed)
/giveturretcorecommand for giving yourself the core (admin/OP only)- No client mods required — works out-of-the-box!
📦 Turret Core Crafting Recipe
How to craft the Turret Core:
|
🛠️ Installation
- Build the project:
- Requires JDK 21+, Maven
- In the project root, run:
mvn clean package -DskipTests
- Copy the generated file
target/TurretPlugin-1.1.jarto your server’spluginsfolder. - Restart your PaperMC server.
⚙️ Usage
- Get a Turret Core:
Craft it (see above), or use the command (OPs only): /giveturretcore - Place a turret:
Hold the core in your hand and right-click any block. - Break a turret:
Simply hit the turret (with hand or tool) to remove it. - Turrets automatically defend the area by shooting at hostile mobs in line of sight (not through walls).
🔒 Permissions & Restrictions
/giveturretcore— OPs only (isOp()check)- Turrets cannot be destroyed by explosions; only a player hit will remove them
✍️ Author & License
- Author: @MidaV141
- Open source, MIT License
💡 Ideas for improvements
- Upgradable turrets (damage, rate of fire, projectile type)
- Region/player-based turret ownership and protection
- Different turret types (melee, fire, etc.)
- Permissions via Permission API
- Configurable parameters (range, damage, cooldown, etc.)
Pull requests and forks are welcome!
For questions or bug reports, use Issues.
Pinned Versions
Pages
Members
Owner