MinevidOld / dtlTraders-plus-

Repository for dtlTraders
2 stars 2 forks source link

Items in the same position from another page are using settings from another page (when its permisson is set) #6

Closed TomLewis closed 2 years ago

TomLewis commented 3 years ago

This one is a little difficult to explain.

I have 2 pages, the first page I have 1 item in the centre of the GUI. On the second page, I have an item in the centre of a GUI.

I changed the first-page permission to something else to "hide" it from other players, so I didn't need to delete the page contents.

But for some reason, when I buy from the second-page item, it's using the details of the first-page item.

I set the user limit to 5x limit for my first page Item which I set the permission on the page. But no matter what I set the second page Item user limit as, it kept picking up the first page limit.

The only way I found how to solve this was to delete the entire shop, then save it to disk, then load it from disk and reload the plugin, then create a new shop.

MinevidOld commented 3 years ago

are the two items the same? (not talking about pricing and so)

TheKissay commented 3 years ago

Hi! I have the same problem and I can contribute to localize the bug.

When I setup two or more pages in one store and set the permission of first page to not appear, the shop loads the GUI of the second page but the "logic" of the first page, and when the user changes to the next page, the shop loads "the logic" and the GUI of the correct page and the bug dissapear.

For example:

1º Create three pages of one shop, the first page must have a permission and the user must set said permission to false imagen (the first page has the permission "test.test" imagen

2º Fill the first and the second pages with items for trade (not neccesary must be the same item, or be in the same slot) imagen (first page) imagen (second page) imagen (third page)

3º When I open the shop for trade anything, the GUI is of the second page because i has setted the permission "test.test" to false and the first page was blocked, but I can't trade the item of the second page. imagen But if i click on the another slot, which is where the item of the first page was, i can trade it. imagen

4º If i try to switch to the third page, the GUI of the second page keeps, but the "logic" changes to the second page and i can trade the correct item for the second page, and the bug dissapear. imagen

This is the output of the /dtl info imagen

And this is the dtlTradersPlus config folder that i created for this example. dtlTradersPlus.zip

MinevidOld commented 2 years ago

Test the newest version. It should be fixed