Death Inventory Limiter icon

Death Inventory Limiter -----

Lose an inv slot every time you die



General Information:

Someone had asked for a way to make it where every time you die, you lose access to one inventory slot. The system takes them away from the very top left down through the top three rows of inv, then from right to left on the hotbar.

You can configure what item is put into the locked out slot (material, name, lore) and how many slots people lose from 0 to 36. People can be exempted from the functionality with a permission node (deathinvlimiter.exempt) and you can manually adjust peoples' limits.

There is no automatic mechanism for turning the limits off, so you need to /dilimit player (player) 0 to free their inv. If someone has an idea on how they'd like to handle that, let me know.

Commands:

DILIMIT LIST

deathinvlimiter.list
Shows who all has had their inventory crippled, and how many slots have been locked out.

DILIMIT MAX (value)
deathinvlimiter.max.view
deathinvlimiter.max.set

Views or set the max slots that can be locked down.

DILIMIT PLAYER player (value)
deathinvlimiter.player.view
deathinvlimiter.player.set

Views or sets the number of locked slots for a player. Use * for the player to adjust all players' limits.

DILIMIT ITEM MATERIAL (value)
deathinvlimiter.item.material.view
deathinvlimiter.item.material.set

View or set the material used for the item that blocks the slot.

DILIMIT ITEM NAME (value)
deathinvlimiter.item.name.view
deathinvlimiter.item.name.set

View or set the name used for the item that blocks the slot.

DILIMIT ITEM LORE view
deathinvlimiter.item.lore.view
View the lore used for the item that blocks the slot.

DILIMIT ITEM LORE set
deathinvlimiter.item.lore.set
Starts the lore setting process. You type each line for the lore into chat. Type period (.) by itself to save, exclamation point (!) to abort and asterisk (*) to insert a blank line.

DILIMIT CMDTRAP VIEW command
deathinvlimiter.cmdtrap.view
View the configuration for the specified command.

DILIMIT CMDTRAP DEL command
deathinvlimiter.cmdtrap.del
Deletes a specified command.

DILIMIT CMDTRAP SET
command argcount target
deathinvlimiter.cmdtrap.set
Configures a command trap. See appendix for details.

DILIMIT RELOAD
deathinvlimiter.reload
Reloads configuration from disk.

Appendix:

Command Traps


Command traps are ways you can reset the slot restriction on players. This is for commands that may clear a player's inventory, like Essential's CI or the built in CLEAR. You tell it the command to trap, then you tell it how many arguments to expect and for each amount, which argument is the target.

So for example, let's assume you want to trap Essential's /ci command. That command works two ways; with no arguments, it will clear the inv of the user who ran the command. If you pass an argument, it will clear the inv of the player you passed.

So with /ci clearing the sender, arg count would be zero as none were passed. The target, would be "self" as it affects the person running the command. For /ci Strahan, there is one argument (Strahan) so the args count is 1. Java starts counting at zero, so the first argument is 0 and that is the player name to clear.

So if I wanted to trap Essential's /CI, I would type:

/dilimit cmdtrap set ci 0 self
/dilimit cmdtrap set ci 1 0

If I had a command /invmanage clear player Strahan for example, I would type:

/dilimit cmdtrap set invmanage 3 2

If you have any questions, post in the Discussion tab.

Custom Slot Limits

You can use the permission node deathinvlimiter.slotlimits.# to give a custom slot limit to a user/group. # would be replaced with a number 0 to 36. When calculating limits, the system will take the max between the max-limit in config and a permission node based limit if one exists.
Resource Information
Author:
----------
Total Downloads: 306
First Release: Aug 29, 2023
Last Update: Sep 3, 2023
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings