Inventory Management Disclaimer
Version 0.8.5 of the plugin introduces new commands for managing player inventories when they enter and leave the dungeon.
Unfortunately, due to what I view as a serious shortcoming in the Bukkit API I am unable to reliably implement this feature to the degree of customization that I would like while also reliably preventing duping bugs or lost items.
Maybe I will have a brainstorm and figure out a way to implement this feature, which is why for the time being I am leaving the inventory management as I originally implemented them. However due to the previous mentioned shortcoming the only configs that I can reliably support are:
Permit: ALL or list of specific items
Keep: NONE
Permit: NONE
Keep: ALL or List of specific items
Restrict: NONE or List of specific items
Keep: NONE
Restrict: ALL
Keep: ALL or List of specific items
While the inventory commands will allow you to try different configurations other than the ones above it will introduce ways for players to duplicate gear or other strange behavior. This stems from my inability to distinguish if the items in their inventory when they leave were part of the list of items that were in the inventory when they entered.
Would there be a way to parse what they came in with to a file and just match that file when they exit? (plus permitted items when they leave)
@gummby8
So a player enters a dungeon and we take a snapshot of their inventory. However we also let them keep whatever they enter with.
Lets say they are wearing a diamond helmet when they enter. We record that they are wearing a diamond helmet and let them enter the dungeon with it. While running the dungeon they take some damage and the helmet loses durability. When they exit the dungeon we say "let them keep whatever they found". We look at their inventory and say "Ok, there's a diamond helmet with durability 89 which does not match the diamond helmet we stored that had a durability of 93. I guess they picked up a new helmet". So we restore the original helmet to their inventory and let them keep the one they found. Now they have two helmets.
Without a way to determine if a piece of inventory is the same piece he had previously (some unique identifier that persists as the item changes) I am unable to perfectly reconcile the differences in their inventory between when they enter and when they leave. There is usually at least one use case that falls through the cracks and introduces a way to either dupe items or lose items.
This is just a simple example. When you get into the implementation it is actually far worse. Now I could just as easily made the inventory management commands much simpler to avoid running into these issues but I was not satisfied with that. Therefore I left the commands the way I want to implement them in hopes that someday I figure out a way around the problem.
@Zimp_Minecraft
Why not implement a class feature so when a player enters a dungeon they pick their class and it gives them items for that class much like Mob Arena and upon leaving the dungeon give them the reward after their inventory is restored
So theres no way to make it so players can keep all and permit all?