MilkBowl / LocalShops

A Shop plugin for Bukkit (Minecraft Server)
http://forums.bukkit.org/threads/17131/
GNU General Public License v2.0
8 stars 4 forks source link

Destroying Shops or Removing Items needs Limiters #10

Open Sleaker opened 13 years ago

Sleaker commented 13 years ago

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.

cerealcable commented 13 years ago

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???