### Importing LifeStealZ via Build Systems
Source: https://docs.zetaplugins.com/lifestealz/dev/usinglszapi
Add the ZetaPlugins repository and the LifeStealZ dependency to your project build configuration.
```xml
zetaplugins
https://maven.zetaplugins.com/
com.zetaplugins
lifestealz
1.0.0
provided
```
```groovy
repositories {
maven {
url 'https://maven.zetaplugins.com/'
}
}
dependencies {
compileOnly 'com.zetaplugins:lifestealz:1.0.0' // Replace with the latest version
}
```
--------------------------------
### Define a Crafting Recipe
Source: https://docs.zetaplugins.com/lifestealz/config/customitems
This snippet demonstrates how to define a crafting table recipe using three rows of materials.
```yaml
recipes:
1:
rowOne:
- "GOLD_BLOCK"
- "GOLD_BLOCK"
- "GOLD_BLOCK"
rowTwo:
- "OBSIDIAN"
- "NETHER_STAR"
- "OBSIDIAN"
rowThree:
- "DIAMOND_BLOCK"
- "DIAMOND_BLOCK"
- "DIAMOND_BLOCK"
```
--------------------------------
### Define a Custom Item Configuration
Source: https://docs.zetaplugins.com/lifestealz/config/customitems
This template shows the full structure for defining a custom item in items.yml, including optional settings for heart items and revive beacons.
```yaml
itemId: # <- This is the item id that can be used in recipes and for permissions
name: "&cHeart"
lore:
- "&7Rightclick to use"
- "This would be a second line"
material: "NETHER_STAR"
enchanted: false
customItemType: "heart"
# --- Heart Item Settings --- (only relevant if customItemType is "heart")
customHeartValue: 1
minHearts: 0
maxHearts: -1
# --- End of Heart Item Settings ---
# --- Revive Beacon Settings --- (only relevant if customItemType is "revivebeacon")
reviveTime: 30
allowBreakingBeaconWhileReviving: true
decoyMaterial: "RED_STAINED_GLASS"
showEnchantParticles: true
showLaser: true
innerLaserMaterial: "RED_GLAZED_TERRACOTTA"
outerLaserMaterial: "RED_STAINED_GLASS"
showParticleRing: true
particleColor: "RED"
# --- End of Revive Beacon Settings ---
requirePermission: false
craftable: true
whitelistedWorlds: []
recipes:
1:
rowOne:
- "GOLD_BLOCK"
- "GOLD_BLOCK"
- "GOLD_BLOCK"
rowTwo:
- "OBSIDIAN"
- "NETHER_STAR"
- "OBSIDIAN"
rowThree:
- "DIAMOND_BLOCK"
- "DIAMOND_BLOCK"
- "DIAMOND_BLOCK"
invulnerable: false
despawnable: true
sound:
enabled: true
sound: ENTITY_PLAYER_LEVELUP
volume: 1.0
pitch: 1.0
```
--------------------------------
### Configuring Plugin Dependencies
Source: https://docs.zetaplugins.com/lifestealz/dev/usinglszapi
Define LifeStealZ as a dependency in your plugin manifest files.
```yaml
name: YourPluginName
version: 1.0
author: author
main: com.yourplugin.MainClass
depend: [LifeStealZ] # Use 'softdepend' instead for soft dependency
```
```yaml
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
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.