# OmniTool API

The `EdToolsOmniToolAPI` allows you to manage OmniTools, which are special items that can have multiple functions or appearances.

### Get API Instance

```java
EdToolsOmniToolAPI omniToolAPI = EdToolsAPI.getInstance().getOmniToolAPI();
```

***

### Methods

#### `getOmniToolItem(Player owner, String toolId)`

Creates an `ItemStack` for a specific OmniTool.

* **`owner`**: The player who will be the owner of the tool.
* **`toolId`**: The ID of the OmniTool as defined in the configuration.
* **Returns**: An `ItemStack` of the requested OmniTool.

#### `getOmniToolFromPlayer(Player owner)`

Returns an `ItemStack`. It will return `null` if player has no omnitool on their inventory.

* **`player`**: The player to get the omnitool from.

#### `isItemOmniTool(ItemStack item)`

Checks if a given `ItemStack` is a valid OmniTool.

* **`item`**: The item to check.
* **Returns**: `true` if the item is an OmniTool, `false` otherwise.

#### `getOmniToolId(ItemStack item)`

Retrieves the unique ID of an OmniTool from its `ItemStack`.

* **`item`**: The OmniTool `ItemStack`.
* **Returns**: A `String` containing the tool's ID, or `null` if it's not an OmniTool.

#### `loadTool(String toolId, ConfigurationSection toolSec)`

Loads a new OmniTool into the plugin at runtime from a configuration section.

* **`toolId`**: The unique ID for this new tool.
* **`toolSec`**: The `ConfigurationSection` containing the tool's definition.
