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

[Bug] Keep-inventory not dropping items on death if gamerule keep inventory true is set #229

Open
rm20killer opened this issue Nov 4, 2022 · 3 comments
Labels

Comments

@rm20killer
Copy link

Steps to reproduce:

  1. Install WorldGuard & WorldGuardExtraFlags
  2. Create a region with "Keep-inventory" flags set to false and /gamerule keepInventory true
  3. kill player inside the region

Expected result:
Player drops items on the ground when killed.

Actual results:
Player inventory is cleared and items are not dropped.

@aromaa aromaa added the bug label Nov 26, 2022
@aromaa
Copy link
Owner

aromaa commented Nov 26, 2022

This is a tricky area because the list of items that are going to be dropped is empty due to the world having keep inventory on. But it's somewhat straight forward to fix as you can set the drop content to be the whole inventory minus items with vanishing enchantment but this would need to be manually specified and is a bit fragile in my opinion. Also due to the way plugins could alter the drop list based on its content is somewhat worrying to me as this could lead to several incompatibilities with other plugins. But I guess that should not be as big worry as those should have specified higher priority than normal.

I was actually aware of this issue and decided to not implement any fixes for it due to the problematic edge cases and just take another look at it if someone complained about it.

As a workaround, you can remove the keep inventory game rule and set it to the global region. This way everything actually just works.

@BoudewijnPopkema
Copy link

This workaround doesn't seem to work anymore. I have the gamerule set to false, keepInventory set to allow on the global region and set to deny for my subregion, I lose my items on death but they don't drop. Outside of the subregion I keep them as intended.

@aromaa
Copy link
Owner

aromaa commented Mar 10, 2024

Plugins are known to conflict with the the keep inventory flag itself. Most likely the case here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants