Destroying Shops or Removing Items needs Limiters
Sleaker opened this issue ยท 1 comments
Destroying a shop should require the shop to be empty, or should remove items the player can not hold. Same with attempting to remove an item from a shop.
Shops with large amounts of items can cause a server crash or extreme lag by remove the shop or an item that has an immense stock level causing the server to attempt to create drops for all of the items into the world.
We should just give a warning and refuse to delete a shop.
Example:
/shop destroy -- If player has enough room the shop is destroyed and the player receives all items from the shop. -- If player does not have enough room, the shop is not destroyed and as much as the player can safely hold is given to the player and then warned. Repeating this command multiple times (assuming the player empties his inventory) should result in a destroyed shop. Could not destroy shop! Shop inventory is too large! /shop destroy force -- Destroys the shop and moves the file to a folder for recovery???