Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

License

Notifications You must be signed in to change notification settings

MrLarkyy/Stacked

Repository files navigation

Stacked

CodeFactor Reposilite Kotlin Discord

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.

🚀 Key Features

  • 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.

📦 Installation

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")
}

💡 Quick Start

Initialization

You must initialize the library with your plugin instance and a CoroutineScope:

initializeStacked(myPlugin, myCoroutineScope)
Stacked.injectFactories()

Registering an Item with Logic

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!")
}

Retrieving a StackedItem

Retrieve items from the registry at any time:

val item = StackedItem.ITEMS["my_namespace:my_item_id"]
val itemStack = item?.getItem()

Serializing Items

You can load items easily from your configuration files:

val item = StackedItem.loadFromYml(ConfigurationSection)

🛠️ Supported Factories

Stacked uses specialized factories to retrieve items from different providers:

  • Base64
  • CraftEngine
  • Eco
  • HeadDatabase
  • ItemsAdder
  • MMOItems
  • MythicMobs
  • Nexo
  • Oraxen
  • Registry Items

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


💬 Community & Support

Got questions, need help, or want to showcase what you've built with KEvent? Join our community!

Discord Banner


Built with ❤️ by Larkyy

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages