QuickShop-Community / QuickShop-Hikari

QuickShop is a shop plugin that allows players to easily sell/buy any items from a chest without any commands. In fact, none of the commands that QuickShop provides are ever needed by a player.
https://modrinth.com/plugin/quickshop-hikari
Other
89 stars 54 forks source link

[BUG] Purchasing multiple items at once in a store with max_stack_size set to 1 will incorrectly stack in the player's backpack #1730

Closed MCLMLI closed 2 months ago

MCLMLI commented 2 months ago

Description

Purchasing multiple items at once in a store with max_stack_size set to 1 will incorrectly stack in the player's backpack

Steps to reproduce

  1. Create a shop for an item with max_stack_size=1
  2. The player buys multiple such items at once (enter 1 or more when asked for the purchase quantity)
  3. Items are incorrectly stacked in the player's backpack

Expected Behaviour

Make items stack correctly in the player's backpack

Screenshots

2024-08-23_23 19 06 2024-08-23_23 19 20 2024-08-23_23 19 29

/quickshop paste URL

https://ghost-chu.github.io/quickshop-hikari-paste-viewer/?remote=https%3A%2F%2Fbytebin.lucko.me%2FAWJjwC7u7T

Additional Context

No response

Checklist

creatorfromhell commented 2 months ago

Description

Purchasing multiple items at once in a store with max_stack_size set to 1 will incorrectly stack in the player's backpack

Steps to reproduce

  1. Create a shop for an item with max_stack_size=1
  2. The player buys multiple such items at once (enter 1 or more when asked for the purchase quantity)
  3. Items are incorrectly stacked in the player's backpack

Expected Behaviour

Make items stack correctly in the player's backpack

Screenshots

2024-08-23_23 19 06 2024-08-23_23 19 20 2024-08-23_23 19 29

/quickshop paste URL

https://ghost-chu.github.io/quickshop-hikari-paste-viewer/?remote=https%3A%2F%2Fbytebin.lucko.me%2FAWJjwC7u7T

Additional Context

No response

Checklist

  • [x] I'm running Paper or Spigot, and not a fork
  • [x] I confirm that Paper/Spigot has been updated to the latest build
  • [x] I confirm that QuickShop-Hikari has been updated to the latest stable version released on Modrinth (or the latest CI version)
  • [ ] I confirm that I have not read these checkboxes and therefore I just ticked them all.
  • [x] I confirm that I'm using QuickShop-Hikari, not QuickShop-Reremake, and I'm well aware that they're maintained by different people, and that Reremake issues shouldn't be reported here.
  • [x] I confirm that I am running a server that is not a Hybird Server, (e.g. Mohist, Magma, CatServer, Banner, etc.), and I am aware that QuickShop-Hikari may not function properly on a Forge/Fabric hybrid server, and I am running at my own risk on such a server program, and I am aware that the I run such server-side programs at my own risk and know that I will not receive any support or help for this behavior.
  • [x] I am well aware that if the Issue Ticket is not filled out correctly and completely, it will simply be closed without any response or reason.

This is less of

Description

Purchasing multiple items at once in a store with max_stack_size set to 1 will incorrectly stack in the player's backpack

Steps to reproduce

  1. Create a shop for an item with max_stack_size=1
  2. The player buys multiple such items at once (enter 1 or more when asked for the purchase quantity)
  3. Items are incorrectly stacked in the player's backpack

Expected Behaviour

Make items stack correctly in the player's backpack

Screenshots

2024-08-23_23 19 06 2024-08-23_23 19 20 2024-08-23_23 19 29

/quickshop paste URL

https://ghost-chu.github.io/quickshop-hikari-paste-viewer/?remote=https%3A%2F%2Fbytebin.lucko.me%2FAWJjwC7u7T

Additional Context

No response

Checklist

  • [x] I'm running Paper or Spigot, and not a fork
  • [x] I confirm that Paper/Spigot has been updated to the latest build
  • [x] I confirm that QuickShop-Hikari has been updated to the latest stable version released on Modrinth (or the latest CI version)
  • [ ] I confirm that I have not read these checkboxes and therefore I just ticked them all.
  • [x] I confirm that I'm using QuickShop-Hikari, not QuickShop-Reremake, and I'm well aware that they're maintained by different people, and that Reremake issues shouldn't be reported here.
  • [x] I confirm that I am running a server that is not a Hybird Server, (e.g. Mohist, Magma, CatServer, Banner, etc.), and I am aware that QuickShop-Hikari may not function properly on a Forge/Fabric hybrid server, and I am running at my own risk on such a server program, and I am aware that the I run such server-side programs at my own risk and know that I will not receive any support or help for this behavior.
  • [x] I am well aware that if the Issue Ticket is not filled out correctly and completely, it will simply be closed without any response or reason.

Are you using the custom stack size configuration in config.yml? This is something that would be resolved by that, going through the individual max stack size setting for item data isn't serving supported so if that's what you're looking for then you'll have to make that a feature request, not a bug report, which I don't think is something that should be added, because you can already set the max stack by material . I.e. golden carrots. https://github.com/QuickShop-Community/QuickShop-Hikari/blob/378a6c186aa4160417874870ab6209b744f6583c/quickshop-bukkit/src/main/resources/config.yml#L557

creatorfromhell commented 2 months ago

Closing as there is a config option for this.