> For the complete documentation index, see [llms.txt](https://docs.edlicense.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edlicense.com/linking-your-plugin/implementing-into-your-code.md).

# Implementing into your code

Once you have added the repo and the dependency into your pom.xml, now it's time to implement it into your code.\
On your main class, import the following static function:

```java
import static com.edwardbelt.edlicense.Main.checkLicense;
```

And now on your onEnable, put the following code. The pluginId can be found in the EdLicense dashboard URL when a plugin is selected or inside your Plugin Settings.

```java
if(!checkLicense("YOUR-PLUGIN-ID", "YOUR-LICENSE-KEY")) {
    Bukkit.getLogger().warning("You are using an invalid license!");
    getServer().getPluginManager().disablePlugin(this);
    return;
}
```

So, if the license is invalid or it has expired or it has reached the maximum amounts of IP addresses it will return false on checkLicense method.
