👋Introduction

How to get the api

First, add the plugin .jar to your plugin project and add this dependency:

<dependency>
    <groupId>me.TastyCake</groupId>
    <artifactId>ItemsCore</artifactId>
    <version>1.0</version>
    <systemPath>${project.basedir}/libs/ItemsCore.jar</systemPath> <!-- Basically the path to the .jar -->
    <scope>system</scope>
</dependency>
// Add to your plugin.yml so ItemsCore will load before your addon.
depend: ["ItemsCore"]
// Now to get the API you can do this:
ItemsCoreAPI api = ItemsCore.getItemsCoreAPI();

Methods:

getItemByName(String (name)) // Will return the item that goes by this name
giveItem(Player, Item) // Will give the item to the player (as ItemStack)
getItemName(ItemStack) // Returns the name nbt data (custom way we store the name of the item)
tryGetItemFromPlayerHand(Player) // (Player) The player that holds the item, returns the Item (custom item class) if the player's item is one, if not, returns false
getInput() // Returns PlayerInput which is a custom class which can help you create an input request from the player

Last updated