Complete sample repository for a modular Minecraft plugin system with:
- Provider-based architecture (abstracts Towny, Vault, Citizens, etc.)
- Multiple independent modules (Storage, Merchants, Travel, AdminShops)
- AI-optimized development (sprint-based, clear deliverables)
FallenStar-Paper-Samples/
├── core/ ← Provider system (START HERE)
├── module-storage/ ← Chest management
├── module-merchants/ ← NPC trading
├── module-travel/ ← Traveling merchants
├── module-adminshops/ ← Template-based shops
└── docs/ ← Documentation
3 Essential Files:
- README.md ← You are here
- REPOSITORY_INDEX.md ← Complete structure
- core/README.md ← Provider system explained
Then:
- CONTRIBUTING.md ← Development guidelines
- SETUP_COMPLETE.md ← What's done, what's needed
# 1. Read main README
cat README.md
# 2. Understand provider system
cat core/README.md
# 3. See complete structure
cat REPOSITORY_INDEX.md# Core Provider Interfaces
cat core/src/main/java/de/fallenstar/core/provider/PlotProvider.java
# Provider Registry (Auto-Detection)
cat core/src/main/java/de/fallenstar/core/registry/ProviderRegistry.java
# Module Example
cat module-storage/src/main/java/de/fallenstar/storage/StorageModule.javaSprint 1: Core Plugin
cd core/
# Create missing providers:
# - NoOpEconomyProvider.java
# - NoOpNPCProvider.java
# - VaultEconomyProvider.java
# - CitizensNPCProvider.java
# - SQLiteDataStore.java
# Test:
mvn clean package
# Copy JAR to server, test provider detection| Sprint | Module | Duration | Deliverable |
|---|---|---|---|
| 1-2 | Core | 2 weeks | Provider system working |
| 3 | Storage | 1 week | Chest management |
| 4-5 | Merchants | 2 weeks | NPC trading |
| 6-7 | AdminShops | 2 weeks | Template shops |
| 8-9 | Travel | 2 weeks | Traveling merchants |
| 10 | All | 1 week | Polish & testing |
Total: 10-12 weeks
Load Context:
1. Sprint goal (from DEVELOPMENT_ROADMAP.md)
2. Relevant interfaces
3. Example implementations
Focus:
- One module at a time
- Clear deliverables
- Test after each feature
Output:
- Working code
- Tests
- Documentation
- Summary for next chat
"Sprint 1: Implement NoOpEconomyProvider
Context:
- EconomyProvider interface (attached)
- NoOpPlotProvider as example (attached)
Deliverable:
- NoOpEconomyProvider.java following the same pattern
- Javadoc comments
- Follows CONTRIBUTING.md guidelines"
Core Plugin:
- 7 Provider interfaces
- 2 Provider implementations (Towny, NoOp)
- 5 Core classes
- 2 Config files
Storage Module:
- Module main class
- Register command example
- Main README
- Repository index
- Contributing guide
- Setup complete guide
- Core README
- 4 Module READMEs
- Parent POM
- .gitignore
- setup.sh
Problem: Direct plugin dependencies are rigid
// ❌ BAD: Direct dependency
import com.palmergames.bukkit.towny.*;
TownBlock block = TownyAPI.getTownBlock(loc);Solution: Provider abstraction
// ✅ GOOD: Provider interface
PlotProvider provider = registry.getPlotProvider();
if (provider.isAvailable()) {
Plot plot = provider.getPlot(loc);
}When plugin missing:
// NoOp Provider throws exception
public Plot getPlot(Location loc)
throws ProviderFunctionalityNotFoundException {
throw new ProviderFunctionalityNotFoundException(/*...*/);
}
// Module handles it gracefully
try {
Plot plot = provider.getPlot(loc);
// Plot-based feature
} catch (ProviderFunctionalityNotFoundException e) {
// Fallback or disable feature
}Core (Foundation)
↑
Storage ← Merchants ← TravelSystem
↑
AdminShops
Rules:
- Modules only depend upward
- No circular dependencies
- Clean interfaces
mvn clean packagecd core/
mvn clean packagecp core/target/*.jar /server/plugins/
cp module-*/target/*.jar /server/plugins/- Create interface in
core/provider/ - Create NoOp in
core/provider/impl/ - Add to
ProviderRegistry - Create concrete impl (optional)
Q: Where do I start?
A: Read README.md, then core/README.md, then start Sprint 1
Q: Can I use this for my server?
A: Yes! This is sample code to build upon
Q: What if I don't have Towny/Vault/etc?
A: That's fine! NoOp providers will be used automatically
Q: Do I need all modules?
A: No! Use only what you need. Start with Core + Storage
Q: How do I add my own module?
A: Copy module-storage structure, follow the pattern
Q: Where's the complete documentation?
A: Check REPOSITORY_INDEX.md for all files
Documentation:
- REPOSITORY_INDEX.md - Complete structure
- CONTRIBUTING.md - Development guidelines
- core/README.md - Provider system
- SETUP_COMPLETE.md - Status & todos
Sample Code:
- All files are heavily commented
- Follow existing patterns
- Javadoc on all public methods
Next Step: Read REPOSITORY_INDEX.md for complete overview
Then: Start Sprint 1 (Core Implementation)
Good luck! 🚀