Restores player inventories on death and removes the items from their corpse

Supported Games

Saves items from a players inventory when they die and restores them when they respawn. These items are removed from the player's corpse to prevent item duplication.

Permissions

All permissions are linked to a loss percentage profile. By default, players will not have any permission to use this plugin. You will need to grant one of the permissions provided or create your own.

When creating a new permission, name it must begin with "restoreupondeath."

When creating a new permission, the profile must contain all 3 container types.

Configuration

"Give default items upon respawn if the players is having items restored" - This will remove the default items (Rock and Torch) when a player respawns if they have items waiting to be restored

"Can drop active item on death" - Setting this to false will prevent the player from dropping the item in their hands when they die

"Percentage of total items lost (Permission Name | Percentage)" - This is a list of permissions and the loss percentage associated with it.For each permission you can customise the percentage of loss for each container type. For example, if you only want the players to keep items on their belt you would specify a loss percentage of 0 to the belt container, and 100 for the other containers as demonstrated in the "restoreupondeath.beltonly" permission.

Setting a loss value to 0 will result in no items lost, and setting a loss value to 100 will result in 100% of items lost.

{
  "Give default items upon respawn if the players is having items restored": false,
  "Can drop active item on death": false,
  "Percentage of total items lost (Permission Name | Percentage (0 - 100))": {
    "restoreupondeath.default": {
      "Belt": 75,
      "Wear": 75,
      "Main": 75
    },
    "restoreupondeath.beltonly": {
      "Belt": 100,
      "Wear": 0,
      "Main": 0
    },
    "restoreupondeath.admin": {
      "Belt": 0,
      "Wear": 0,
      "Main": 0
    }
  },
  "Version": {
    "Major": 0,
    "Minor": 3,
    "Patch": 0
  }
}

MIT License


Copyright (c) 2020 k1lly0u


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.