Stacked is a robust Kotlin library for Minecraft (Paper/Spigot) developers, designed to provide a unified abstraction layer for item management. It simplifies handling, serializing, and modifying items across various popular custom item plugins.
- Unified Item API: Interface with multiple item providers through a single, consistent API.
- Cross-Plugin Support: Native support for Oraxen, Nexo, ItemsAdder, MythicMobs, MMOItems, HeadDatabase, Eco, and CraftEngine.
- Rich Item Options: Granular control over item properties including Lore, Enchants, Custom Model Data, Dye colors, and Spawner types via ItemOptionHandle.
- Serialization Layer: Seamlessly serialize and deserialize items for database storage or configuration files.
- Interaction Handling: Built-in event system to handle complex item interactions (clicks, drops, swaps) easily.
Add the repository and dependencies to your build.gradle.kts:
repositories {
maven {
name = "aquatic-releases"
url = uri("https://repo.nekroplex.com/releases")
}
}
dependencies {
implementation("gg.aquatic:Stacked:26.0.1")
implementation("gg.aquatic:KRegistry:25.0.1")
implementation("gg.aquatic:KEvent:1.0.4")
}You must initialize the library with your plugin instance and a CoroutineScope:
initializeStacked(myPlugin, myCoroutineScope)
Stacked.injectFactories()You can register items with unique IDs and attach interaction handlers directly:
val stackedItem = ... // Create or load your StackedItem
stackedItem.register("my_namespace", "my_item_id") { event ->
event.player.sendMessage("You clicked a custom item!")
}Retrieve items from the registry at any time:
val item = StackedItem.ITEMS["my_namespace:my_item_id"]
val itemStack = item?.getItem()You can load items easily from your configuration files:
val item = StackedItem.loadFromYml(ConfigurationSection)Stacked uses specialized factories to retrieve items from different providers:
- Base64
- CraftEngine
- Eco
- HeadDatabase
- ItemsAdder
- MMOItems
- MythicMobs
- Nexo
- Oraxen
- Registry Items
Contributions are welcome! Please feel free to submit a Pull Request.
Got questions, need help, or want to showcase what you've built with KEvent? Join our community!
- Discord: Join the Aquatic Development Discord
- Issues: Open a ticket on GitHub for bugs or feature requests.
Built with ❤️ by Larkyy