# Getting Started

## Installation

**View here:**

{% embed url="<https://jitpack.io/#Manered/Utils/>" %}

After you add the repository to your Gradle/Maven project, you have to do the following:

1. With a JavaPlugin instance

{% code fullWidth="false" %}

```java
package dev.manere.example;

import dev.manere.utils.library.Utils;

public final class ExamplePlugin extends JavaPlugin {
    @Override
    public void onEnable() {
        Utils.init(this);
        
        /* You can now use the library below this Utils initialization */
        /* Let's register a random listener that doesn't of course exist */
        Registrar.events(new WhateverListenerYouHave());
    }
}
```

{% endcode %}

2. With a PluginWrapper instance from `dev.manere.utils.library.PluginWrapper`

```java
package dev.manere.example;

import dev.manere.utils.library.wrapper.PluginWrapper;

public class ExamplePlugin extends PluginWrapper {
    @Override
    protected void start() {
        // Do anything you want to do with the library.
        // Obviously the PluginWrapper automatically sets up your plugin
    }
}
```


---

# 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://manered.gitbook.io/utils/getting-started.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.
