Описание
# LifeWars
## **What You Should Know!**
LifeWars is my own Minecraft plugin that introduces the popular **lifesteal mechanic** to your **server or gameplay**.
LifeWars is designed to be highly configurable, with **25+ configuration options** allowing you to customize how lifesteal works on your server.
---
## **Why I Made LifeWars**
I made LifeWars because I wanted a lifesteal plugin that I could actually use for my own communities and servers.
I also wanted to make something that gives server owners **more control** over their lifesteal experience instead of being stuck with a fixed system.
---
## **Things YOU Can Do**
*(Only a small part of the plugin!)*
* ✅ **Enable / Disable** the entire plugin
* ✅ **Enable / Disable** Reviving
* ✅ **Enable / Disable** Heart usage and equipping
* ✅ **Set** Maximum Health
* ✅ **Set** Revive Health
* ✅ **Toggle** Commands
* ✅ **Enable / Disable** Custom Recipes
* ✅ **Enable / Disable** Heart Recipes
* ✅ **Enable / Disable** Revive Recipes
* ✅ **Set** Custom Messages
* ✅ **Change** Item Names
* ✅ **Change** Item Lore
* ✅ **Customize** Heart Items
* ✅ **Customize** Revive Items
* ✅ **Customize** Crafting Recipes
* ✅ **Edit Recipes** directly in-game
* ✅ **Spawn** LifeWars items through admin commands
* ✅ **Manage** eliminated/banned players
* ✅ **Configure** almost every part of the plugin
---
## **Custom Crafting Recipes**
LifeWars now supports **fully configurable crafting recipes**.
You can customize the layouts for:
**|- Heart Recipe:**
**|- Revive Recipe:**
Recipes can also be edited **in-game** using the recipe editor, allowing server administrators to change recipes without manually editing the configuration.
---
## **Commands**
LifeWars includes several commands for both players and administrators.
Most of the commands are **admin-related**, allowing server owners to manage health, revives, configuration, recipes, and LifeWars items.
Some of the available functionality includes:
* **Admin Revive**
* **Eliminate**
* **Set Health**
* **Reload Configuration**
* **Edit Configuration**
* **Admin Item Spawning**
* **Recipe Editing**
---
## **Permissions**
* **LifeWars**.adminrevive.**use**
* **LifeWars**.EditConfig.**use**
* **LifeWars**.sethealth.**use**
* **LifeWars**.eliminate.**use**
* **LifeWars**.reloadconfig.**use**
* **LifeWars**.adminspawnitem.**use**
---
# **How to Use Items**
## **|- Revive Item**
### **Step 1**
Craft the **Revive Item**.
Depending on your configuration, the recipe may not appear in the crafting recipe book because Minecraft does not recognize the custom Heart ingredient normally.
### **Step 2**
Rename the Revive Item to the name of the **eliminated player** you want to revive.
### **Step 3**
Right-click with the renamed Revive Item.
If the player is eliminated, they will be revived.
---
## **|- Heart Item**
### **Step 1**
Craft the **Heart** using the configured recipe.
### **Step 2**
Done!
You can use Hearts to:
* ❤️ Give health to another player
* ❤️ Equip/use a Heart
* ❤️ Use Hearts in the Revive recipe
---
# **Heart System**
Hearts are the main item used by the LifeWars lifesteal system.
Players can configure how Hearts work, including whether they can be used or equipped and how much health players can have.
LifeWars also supports **custom item models and CustomModelData**, allowing resource packs to give the Heart item a completely custom appearance.
---
# **Elimination & Reviving**
When a player reaches the configured elimination condition, they can be added to the LifeWars banned/eliminated player system.
The plugin includes:
* Player elimination
* Automatic ban handling
* Ban and kick functionality
* Unbanning through the revive system
* Offline-player handling
* Revive item validation
* Configurable revive health
*
Banned players are stored in a dedicated **BannedPlayers.yml** file.
---
# **Configuration**
LifeWars is built around configuration.
You can edit the plugin's `config.yml` to change things such as:
* Maximum health
* Revive health
* Heart settings
* Revive settings
* Item names
* Item lore
* Messages
* Crafting recipes
* PvP restrictions
* Banned items
* Plugin features
The configuration also contains comments explaining what different settings do.
### **Basic Configuration**
```yaml
features:
reviveBookEnabled: true
heartUseEnabled: true
withdrawCommandEnabled: true
gameplay:
maxHealth: 40
reviveHealth: 8
dropHeartsIfMax: true
items:
# Heart
heartName: "Heart"
heartLore: "Right-click to use!"
# New string-based item model key (1.21+ style). Example: "lifewars:defaultheart"
# If set, this is used instead of heartCustomModelData.
heartItemModel: "lifewars_defaultheart"
heartCustomModelData: -1
# Revive Book
reviveBookName: "Revive Book"
reviveBookLore: "Rename this book to the player name you want to revive, then right-click to revive that player!"
recipes:
customRecipesEnabled: true
heartRecipeEnabled: true
reviveBookRecipeEnabled: true
# Recipe layouts going from left to right, top to bottom, and empty spaces are represented by AIR
layouts:
heart:
grid:
- DIAMOND_BLOCK
- GOLD_BLOCK
- DIAMOND_BLOCK
- NETHERITE_INGOT
- TOTEM_OF_UNDYING
- NETHERITE_INGOT
- DIAMOND_BLOCK
- GOLD_BLOCK
- DIAMOND_BLOCK
revivebook:
grid:
- DIAMOND_BLOCK
- CUSTOM_HEART
- GOLD_BLOCK
- CUSTOM_HEART
- NETHER_STAR
- CUSTOM_HEART
- GOLD_BLOCK
- CUSTOM_HEART
- DIAMOND_BLOCK
messages:
prefix: "[LifeWars]"
announceAdminRevive: true
usageError: "Usage: %usage%"
needToBePlayer: "You must be a player to use this command!"
playerNotFound: "Player not found!"
disabledInConfigMsg: "This feature is disabled in the config!"
eliminateSuccess: "You have eliminated %player%!"
reviveSuccess: "You have revived %player%!"
onlyReviveElimPlayers: "You can only revive eliminated players!"
eliminatedJoin: "You have no hearts left!"
eliminatedReason: "Ran out of lives."
setHeartsConfirmSingle: "Set %player%'s hearts to %amount% hearts"
reloadMsg: "Reloaded the plugin!"
noWithdraw: "You will be eliminated if you withdraw one more heart!"
inventoryFull: "Your inventory is full! You cannot withdraw!"
withdrawMin: "You cannot withdraw less than 1 heart!"
successWithdraw: "You received %amount%x %item%!"
maxHeartLimitReached: "You have already reached %limit% hearts!"
recipeNotCraftable: "You cannot craft this item!"
recipeNotFound: "This recipe does not exist!"
recipeSavedActionbar: "Recipe saved!"
configKeyNotFound: "Config key not found: %key%"
configUpdated: "Config value %key% set to %value%"
```
---
# **Recipe Editor**
LifeWars includes an **in-game recipe editor**.
Server administrators can:
* Edit recipe layouts
* Change recipe ingredients
* Configure Heart recipes
* Configure Revive recipes
* Save recipes directly from the game
* Reload recipes without modifying the plugin itself
This makes it much easier to customize LifeWars for your server.
---
# **Resource Pack Support**
LifeWars supports custom models for its items.
Heart items can use:
* **Custom Item Models**
* **CustomModelData**
* **CustomModelData Strings**
This allows resource packs to give LifeWars items their own unique appearance.
---
# **Contact Me**
If you have any suggestions, bugs, or ideas for LifeWars, feel free to contact me @ https://discord.gg/weYbKCmhsY