Giter VIP home page Giter VIP logo

createitem's Introduction

CreateItem

This is Minecraft Paper API Plugin for Groovy

API Feature

  • Create item
  • Create custom item

API License

This API uses the GPL-3.0 open source license.

How to use this API in server

This is a dependency library, you must add this API to use the plugin using this dependency library. To use a plugin using this dependency library, you need to do the following:

  • Step 1: Please go to your server.
  • Step 2: Please add this dependency library to your plugins folder.

If you did the above, you can use the plugin using this dependency.

Dependency Library

API Build

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

<dependency>
  <groupId>com.github.ProjectTL12345</groupId>
  <artifactId>CreateItem</artifactId>
  <version>VERSION</version>
</dependency>
  • Gradle (Groovy DSL)
repositories {
  jcenter()
  maven {
    url = 'https://jitpack.io'
  }
}

dependencies {
  compileOnly 'com.github.ProjectTL12345:CreateItem:VERSION'
}
  • Gradle (Kotlin DSL)
repositories {
  jcenter()
  maven("https://jitpack.io")
}

dependencies {
  jcenter()
  compileOnly("com.github.ProjectTL12345:CreateItem:VERSION")
}

How to use this API dependency

Making normal item

  • Java
public void onExample(Player targetPlayer) {
  CreateItem item = new CreateItem();
  item.addItem(Material.DIAMOND_SWORD, 1, targetPlayer);
}
  • Groovy
void onExample(Player targetPlayer) {
  CreateItem item = new CreateItem()
  item.addItem(Material.DIAMOND_SWORD, 1, targetPlayer)
}
  • Kotlin
fun onExample(targetPlayer: Player) {
  val item = CreateItem()
  item.addItem(Material.DIAMOND_SWORD, 1, targetPlayer)
}
  • Scala
fun onExample(targetPlayer: Player): Unit = {
  val item = CreateItem()
  item.addItem(Material.DIAMOND_SWORD, 1, targetPlayer)
}

Making custom item

  • Java
public void onExample(Player targetPlayer) {
  CreateItem item = new CreateItem();
  item.addCustomItem(Material.DIAMOND_SWORD, 1, targetPlayer, ChatColor.GREEN + "Test", null");
}
  • Groovy
void onExample(Player targetPlayer) {
  CreateItem item = new CreateItem()
  item.addCustomItem(Material.DIAMOND_SWORD, 1, targetPlayer, "${ChatColor.GREEN}Test", null") // Parentheses can be omitted
}
  • Kotlin
fun onExample(targetPlayer: Player) {
  val item = CreateItem()
  item.addCustomItem(Material.DIAMOND_SWORD, 1, targetPlayer, "${ChatColor.GREEN}Test", null")
}
  • Scala
fun onExample(targetPlayer: Player): Unit = {
  val item = CreateItem()
  item.addCustomItem(Material.DIAMOND_SWORD, 1, targetPlayer, "${ChatColor.GREEN}Test", null")
}

createitem's People

Contributors

devproje avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.