Closed call911nowplz closed 2 years ago
Also sometimes the KeepInventory rules are completely ignored when you die. Which makes players lose their items
More so this will break with other plugins such as Magic which switch out your hotkey/inventory for a menu. If you teleport into the dungeon with a magic skill menu (or custom menu) open you lose the skill options.
Also vice versa, when exiting the dungeon with the skills/custom menu open DungeonsXL will make all custom menu items into actual items while losing your entire inventory.
More so this will break with other plugins such as Magic which switch out your hotkey/inventory for a menu. If you teleport into the dungeon with a magic skill menu or custom menu open you lose them options.
Also vice versa, when exiting the dungeon with the skills/custom menu open DungeonsXL will make all custom menu items into actual items while losing your entire inventory.
I'm afraid but I can't reasonably expect that the player inventory is used as a GUI instead of as item storage, much less deal with that case abstractly. If the player inventory is reinterpreted in such a fundamental way, it's better not to use keepInventory rules.
I looked at the leave command which uses your common library wrapper. Perhaps we can assume other plugins will use the inventory generically by storing the Player's inventory in memory to avoid plugin collisions from occurring.
If I come up with something and thoroughly test it, I'll make a PR. This proposed change will only fix the plugin collision where inventory is used as GUI but I dont think this will fix OP's issue. I didnt look too much into that issue but it looks like we should cache the inventory once ReadySign
button is pressed and players are teleported to StartSign
.
keepInventoryOnEnter: true causes multiple issues:
To produce this issue, join a dungeon that has both keepInventoryOnEnter: true and keepInventoryOnEscape: false, Change your armor in lobby then escape the dungeon. You will lose your armor
To produce the 2nd part of the issue, Have a golden apple as a reward in a Dungeon chest. Enter the Dungeon with golden apples. Stack the reward golden apple on-top of your golden apples and escape. You get to keep the extra golden apples without completing the dungeon.
Currently using v0.18-SNAPSHOT-1097 Spigot 1.16.5