API Examples
This page will help you understand how to install and use the SimpleClans API in your plugins.
Step 1. Add the SimpleClans API to your plugin
There are two ways to do this: via Maven or locally. We strongly recommend doing this via Maven.
Maven
Add the following lines to pom.xml
:
Locally
In this example, we will use the IntelliJ IDEA, but the following actions also work in other IDEs.
Open the structure of your project (
F4
)Select Libraries, click on the cross, select "New Project Library -> Java" in the window that appears and add SimpleClans.
Return to the project structure, then go to Project Settings - > Modules, set the compilation mode to "Provided".
Step 2. Use the SimpleClans API
What do you need to know?
Example of using SimpleClans API
You can hook into SimpleClans plugin like so:
If you don't want to specify a check for the presence of SimpleClans, you can always specify a dependency in plugin.yml
:
Step 3. Continue your learning
Last updated
Was this helpful?