Welcome to the comprehensive documentation for KPaper - a Kotlin utility library that simplifies Paper plugin development.
- Installation & Setup - Set up KPaper in your project
- Your First Plugin - Create your first KPaper plugin
- Migration Guide - Migrate from vanilla Bukkit/Paper
- Plugin Development - Understanding KPlugin and core concepts
- Feature Configuration - Managing plugin features
- Dependency Injection - Working with dependencies
- Naming Conventions - API and package naming standards
- Event System - Event handling and custom events
- Command Framework - Creating commands with arguments
- Tip: Using the official Gradle plugin? See the “Using KPaperGradle (recommended)” section in that page for auto‑registration (https://github.com/ModLabsCC/KPaperGradle).
- Inventory & GUI - Item builders and GUI systems
- Extensions - Kotlin extensions for Bukkit classes
- Utilities - Helper functions and utilities
- Coroutines - Async operations with Kotlin coroutines
- World Management - World generation and manipulation
- Messages & I18n - Message formatting and translations
- Visual Effects - Particle effects and displays
- Game Mechanics - Countdowns, timers, and game systems
- File Management - Configuration and file handling
- Common Patterns - Frequently used code patterns
- Plugin Examples - Complete plugin examples
- Best Practices - Recommended practices and conventions
- API Reference - Complete API documentation
- Configuration Reference - All configuration options
- Troubleshooting - Common issues and solutions
class MyPlugin : KPlugin() {
override fun startup() {
// Event handling
listen<PlayerJoinEvent> {
it.player.sendMessage("Welcome ${it.player.name}!")
}
// Commands
command("hello") {
description = "Say hello to a player"
execute { sender, args ->
sender.sendMessage("Hello ${args.getOrNull(0) ?: "World"}!")
}
}
// Custom GUIs
val gui = simpleGUI("My GUI", 9) {
item(0, ItemBuilder(Material.DIAMOND).name("Click me!").build()) {
player.sendMessage("You clicked the diamond!")
}
}
}
}We welcome contributions! Please see our Contributing Guide for details on how to contribute to KPaper.
KPaper is licensed under the GPL-3.0 License. See LICENSE for details.