# API

## Add GSigns to your plugin <a href="#add-oraxen-to-your-plugin" id="add-oraxen-to-your-plugin"></a>

In order to use the GSigns API, you need to add the jar-file to your classpath. The latest release can be downloaded from the official github repo: [git.io/gsigns-api](https://git.io/gsigns-api)

{% hint style="info" %}
Don't forget to include GSigns in your `plugin.yml`:

```yaml
depend: [GSigns]
```

{% endhint %}

## Examples of use

Implementing GSigns is quite simple. It requires getting the GSigns-API service from the Bukkit ServiceManager.

```java
// Returns whether the GSigns-API could be found
private boolean setupGSignsAPI() {
    if(getServer().getPluginManager().getPlugin("GSigns") == null) {
    		return false;
    }
    RegisteredServiceProvider<GSignsAPI> rsp = getServer().getServicesManager().getRegistration(GSignsAPI.class);
    if(rsp == null) {
				return false;
		}
		gSignsAPI = rsp.getProvider(); // Save the instance of the public API
		return gSignsAPI != null;
}
```

### Create a sign from a code

```java
signUid = gSignsAPI.createSign(code, location1, location2); // where code is a String
```

### Create a sign from an Order object

```java
signUid = gSignsAPI.createSign(order, location1, location2); // where order is an Object from type Order
```

### Remove a sign

```java
gSignsAPI.removeSign(signUid); // where signUid is a previously received UUID object
```


---

# 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://stylextv.gitbook.io/gsigns/developers/api.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.
