An advanced Minecraft combat system featuring throwing mechanics, entity interactions, combo attacks, and RPG-style stats. Built for Paper 1.21+.
- Combo Combat System: Chain attacks together with input sequences
- Throwing Mechanics: Throw swords, items, and even grabbed entities
- Advanced Movement: Dash c2/backward, air dodges, and momentum-based combat
- RPG Stat System: Aspects (stats) and Resources with regeneration
- Entity Grabbing: Grab and throw enemies mid-combat
- Custom AI: Hostile NPCs with pathfinding and combat behaviors
- Bézier Curve Attacks: Smooth, dynamic attack animations
- Minecraft Version: 1.21+
- Server: Paper (or compatible fork)
- Java: 21+
- Build Tool: Gradle 8.8+
# Clone the repository
git clone https://github.com/Mere-Solace/Sword-Combat-Plugin.git
cd Sword-Combat-Plugin
# Build the plugin
./gradlew build
# Run test server (automatically downloads Paper and starts server)
./gradlew runServerThe plugin JAR will be at: build/libs/Sword-1.0-SNAPSHOT.jar
-
Download Paper Server
- Get Paper 1.21+ from https://papermc.io/downloads/paper
- Place in a server directory
-
Accept EULA
- Run the server jar once to generate
eula.txt - Change
eula=falsetoeula=true
- Run the server jar once to generate
-
Build Plugin
./gradlew build
-
Install Plugin
- Copy
build/libs/Sword-1.0-SNAPSHOT.jartoserver/plugins/ - Start the server
- Copy
-
Connect
- Launch Minecraft 1.21
- Direct Connect to
localhostor0
Note: Must be holding a shield in offhand for start clicking functionality
| Action | Input | Description |
|---|---|---|
| Attack Combo | Left → Left → Left |
Three-hit attack combo |
| Throw Item | Drop → Right → Hold Right |
Throw non-consumable items |
| Grab Entity/Sword | Shift → Left |
Pull lodged sword or grab enemy |
| Throw Grabbed Entity | Swap |
Hurl the grabbed entity |
| Dash Forward | Swap Item → Swap Item |
Quick c2 dash |
| Dash Backward | Shift → Shift |
Quick backward dash |
| Dash to Thrown Sword | Dash while targeting sword | Dash to lodged sword and retrieve it automatically |
src/main/java/btm/sword/
├── commands/ # Command handlers
├── listeners/ # Event listeners
├── system/
│ ├── action/ # Combat actions and skills
│ ├── combat/ # Combat mechanics (afflictions, etc.)
│ ├── entity/ # Entity wrappers and AI
│ ├── input/ # Input combo system
│ ├── item/ # Custom item handling
│ └── playerdata/ # Player data persistence
└── util/ # Utility classes (vectors, bezier, etc.)
# Build JAR
./gradlew build
# Run tests
./gradlew test
# Check code style
./gradlew checkstyleMain
# Auto-fix formatting
./gradlew spotlessApply
# Run all checks
./gradlew check# Run test suite
./gradlew test
# View test report
open build/reports/tests/test/index.htmlThe project uses multiple linters and quality tools:
- Checkstyle: Style and conventions
- Spotless: Auto-formatting (Java + Markdown)
- Markdownlint: Markdown documentation quality
See docs/setup/automation-tools.md and docs/setup/github-actions-guide.md for details.
- Automation Tools Guide: Quality tools and local usage
- GitHub Actions Guide: CI/CD pipeline and automated checks
- Contributing: Contribution guidelines
- Documentation Standards: Javadoc guidelines
- Development Environment Setup: Java 21 and IDE configuration
- SwordEntity: Base class for all combat entities
- Combatant: Adds combat capabilities (attacking, grabbing, dashing)
- SwordPlayer: Player-specific implementation with input handling
- Hostile: AI-controlled enemies with pathfinding
- Passive: Non-hostile NPCs
Combo attacks are detected using a tree-based finite state machine (InputExecutionTree) that
tracks input sequences and triggers actions with cooldowns.
Active Development - Many features are work-in-progress:
Completed:
- Basic combat and throwing mechanics
- Input combo system
- Entity grabbing and throwing
- RPG stat system
- Player data persistence
In Progress:
- AI behaviors (basic implementation)
- Skill system (in development)
- Advanced abilities
Planned:
- More weapon types
- Visual effects
- Dungeons and encounters
Contributions are welcome! This is a work in progress with many features yet to be implemented.
-
Setup Development Environment
- See Development Environment Setup for Java 21 and IDE configuration
- Includes troubleshooting for common setup issues
-
Read Guidelines
- See CONTRIBUTING.md for:
- Code style and formatting
- Submitting pull requests
- Reporting issues
- Development workflow
- See CONTRIBUTING.md for:
- Discord: https://discord.gg/n5vty6m7
- Issues: https://github.com/Mere-Solace/Sword-Combat-Plugin/issues
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Built for Paper/Spigot Minecraft servers. Uses modern Java combat mechanics and RPG design patterns.