Getting Started with API
Getting Started with zItems API
What Can You Build?
Setting Up Your Development Environment
Step 1: Project Setup
repositories {
maven("https://repo.papermc.io/repository/maven-public/")
// Add zItems repository here when available
mavenLocal() // For now, install zItems API to local Maven
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
compileOnly(files("libs/zItems-api-1.0.0.jar")) // Path to zItems API
}Step 2: Plugin Setup
API Structure
Core Packages
Quick Examples
Example 1: Simple Custom Effect
Example 2: Accessing Managers
Example 3: Listening to zItems Events
Example 4: Accessing Registries
Key Concepts
1. Registry Pattern
2. Manager Pattern
3. Annotation-Driven Discovery
4. Effect Context
Development Workflow
1. Create Your Effect
2. Register Your Package
3. Test Your Effect
4. Add Custom Settings
Best Practices
1. Always Call scanPackages()
2. Use Sealed Interfaces
3. Handle Errors Gracefully
4. Respect Permissions
5. Use Priority Correctly
6. Document Your Code
Complete Example Plugin
Troubleshooting
Effect Not Registered
Wrong Package Scanned
Settings Not Loading
Resources
Last updated