# Introduction

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

{% code fullWidth="false" %}

```xml
<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>
```

{% endcode %}

```yml
// Add to your plugin.yml so ItemsCore will load before your addon.
depend: ["ItemsCore"]
```

```java
// Now to get the API you can do this:
ItemsCoreAPI api = ItemsCore.getItemsCoreAPI();
```

Methods:

```javascript
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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tastycake.gitbook.io/itemscore/the-api/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
