Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving players with keepInventory enabled on death saves a state where a player has an empty inventory as #getDrops returns an empty list #73

Closed
emmanuelvlad opened this issue Dec 5, 2022 · 0 comments
Labels
type: bug This issue is about something that isn't working as intended

Comments

@emmanuelvlad
Copy link
Contributor

Issue:

When a player dies with keepInventory enabled (event.getKeepInventory), it saves an empty inventory because #getDrops is empty.

Usecase:

Using a dynamic keepInventory in certain worlds/regions and need to save players inventory on death if keepInventory is disabled

Proposed solutions:

  1. Do not save on death if the player has keepInventory enabled.
    | This is a quick fix but will not support custom half-keepinv where only some items drop
  2. Save player's inventory and drops only if drops are not empty
    | Supports custom half-keepinv and saves only if there are drops, else do not create useless snapshot
@WiIIiam278 WiIIiam278 changed the title Support keepInventory on death Saving players with keepInventory enabled on death saves a state where a player has an empty inventory as #getDrops returns an empty list Dec 5, 2022
@WiIIiam278 WiIIiam278 added the type: bug This issue is about something that isn't working as intended label Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug This issue is about something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants