▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/AbilityItemsAPI
AbilityItemsAPI

AbilityItemsAPI

An API to make the creation of items with abilities easier for developers

267
3

This plugin makes it easier for developers to make abilities for items.

Import the API

To import the API, you can either use Maven or Gradle. Here's how

<repository>
  <id>synkdev-repo-releases</id>
  <name>SynkDev Repository</name>
  <url>https://maven.synkdev.cc/releases</url>
</repository>

<dependency>
  <groupId>cc.synkdev</groupId>
  <artifactId>AbilityitemsAPI</artifactId>
  <version>1.2</version>
  <scope>provided</scope>
</dependency>

Using Maven

maven {
    url "https://maven.synkdev.cc/releases"
}

implementation "cc.synkdev:AbilityitemsAPI:1.2"

Using Gradle

Create your items

Creating an item is very straightforward. Here's some code for example

ItemStack itemStack = new ItemStack(Material.STICK);
ItemMeta meta = itemStack.getItemMeta();
meta.setDisplayName(ChatColor.BOLD+"THE STICK");
itemStack.setItemMeta(meta);

AbilityItem testItem = AbilityItem.newItem("testItem").from(itemStack).lockInSlot().setQuantity(3).setClickEvent(event -> {
    event.getPlayer().sendMessage(ChatColor.ITALIC+"You clicked da stick...");
}).build();

This creates a stick named "THE STICK". When a player clicks it, they get the message "You clicked da stick" in the chat.

To give an item to a player, it's also very straightforward:

testItem.give(Bukkit.getPlayerExact("Notch"));

For full documentation, visit the docs. Here's the maven repository: https://maven.synkdev.cc/

Совместимость

Minecraft: Java Edition

1.21.x1.20.x1.19.x1.18.x1.17.x1.16.x1.15.x1.14.x1.13.x1.12.x1.11.x1.10.x1.9.x1.8.x1.7.x

Платформы

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:MIT
Опубликован:1 год назад
Обновлён:1 год назад
Главная