apavarino / Deadchest

Minecraft Plugin - Keep your inventory in a chest when you die !
https://dev.bukkit.org/projects/dead-chest
GNU General Public License v3.0
18 stars 17 forks source link

[Feature Request] An option to lower the ammount of stored XP. #69

Closed VonSparq closed 7 months ago

VonSparq commented 9 months ago

Is your feature request related to a problem? Please describe. No, it's a new feature I'm requesting.

Describe the solution you'd like When a player dies, the chest is generated and StoreXP is set to true, all of the player's experience is saved within the Dead Chest and restored to them upon opening the chest. This is vastly preferable to vanilla behavior where player looses almost all of his XP. I would like to suggest an additional configuration option to this feature: A config option like stored-XP-percentage: that accepts values from 1.0 to 0.0 (defaulting to 1.0 to maintain current behavior) where 0.02 would reduce the stored XP by 2%. This would allow the admin to decide how much XP should be stored, if any. And if the value were to be set to something like 0.2, players could recover most of their XP while still being punished for their death by loosing some of it.

Describe alternatives you've considered An alternative would be either storing all of the XP or sticking with the vanilla behavior. I think the proposed solution would allow a middle ground of loosing some XP but not almost ll of it while letting the server owner fine-tune the XP on death behavior more exactly.

apavarino commented 7 months ago

PR : https://github.com/apavarino/Deadchest/pull/72

apavarino commented 7 months ago

Added on 4.19.0. The update will be available soon. Thanks for the feedback !