Using the LifeStealZ API
How to use the LifeStealZ API in your project
This page is about how to import the LifeStealZ API into your project and how to use it.
Importing the API
To use the LifeStealZ API, you need to add it as a dependency in your project.
Add the following to your pom.xml
file:
<repositories>
<repository>
<id>zetaplugins</id>
<url>https://maven.zetaplugins.com/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.zetaplugins.lifestealz</groupId>
<artifactId>lifestealz</artifactId>
<version>1.0.0</version> <!-- Replace with the latest version -->
<scope>provided</scope>
</dependency>
</dependencies>
Add the following to your build.gradle
file:
repositories {
maven {
url 'https://maven.zetaplugins.com/'
}
}
dependencies {
compileOnly 'com.zetaplugins.lifestealz:lifestealz:1.0.0' // Replace with the latest version
}
You can find the latest version in the GitHub releases or a list of all available versions on the ZetaPlugins Maven page.
Adding LifeStealZ as a (soft)dependency
To add LifeStealZ as a (soft)dependency in your plugin, you cann add it to your plugin.yml
or paper-plugin.yml
file:
name: YourPluginName
version: 1.0
author: author
main: com.yourplugin.MainClass
depend: [LifeStealZ] # Use 'softdepend' instead for soft dependency
name: YourPluginName
version: 1.0
author: author
main: com.yourplugin.MainClass
dependencies:
server:
LifeStealZ:
load: BEFORE # This means that LifeStealZ will be loaded before your plugin
required: false # Use 'true' for hard dependency
What can you do with the API?
If you want to learn, what you can do with the LifeStealZ api, please refer to the following documentation pages or the JavaDoc.