/Atem

PaperMC Item Library

Primary LanguageKotlinGNU General Public License v3.0GPL-3.0

Atem

Kotlin Kotlin Gradle GitHub
A Papermc Item Library.

Features

  • DSL style code
  • Modular inventory GUI without the requirement of event declaration

Dokka

You can see the Dokka document.

License

This library is licensed under the General Public License v3.0.

Import Library

  • Maven
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.noobnuby</groupId>
    <artifactId>atem</artifactId>
    <version>VERSION</version>
</dependency>
  • Gradle (Groovy DSL)
repositories {
  mavenCentral()
  maven { url 'https://jitpack.io' }
}

dependencies {
  implementation 'com.github.noobnuby:atem:VERSION'
}
  • Gradle (Kotlin DSL)
repositories {
  mavenCentral()
  maven("https://jitpack.io")
}

dependencies {
  implementation("com.github.noobnuby:atem:VERSION")
}

This config is not yet available

If you are using spigot/paper 1.17+, you can use the library-loading feature instead of shading.

  • plugin.yml (1.17+)
# ...
libraries:
  - com.noobnuby.lib:atem-api:VERSION
# ...

How to use this Library

This library is kotlin-optimized. DSL pattern will break unless you use kotlin.

class Test {
  fun giveItem(player: Player) {
      val item = Atem.register(Material.STICK,1,Component.text("막대기"), listOf(Component.empty())) {
          rightClickEvent {
              it.sendMessage("우클릭 함!")
          }
      }
      player.inventory.addItem(item)
  }
}