NLthijs48 / AreaShop

A Bukkit/Spigot (Minecraft server) plugin that facilitates renting and buying WorldGuard regions
GNU General Public License v3.0
55 stars 89 forks source link

ArmorStand Dupe #509

Closed Ergenta closed 5 years ago

Ergenta commented 5 years ago

Current behavior Rent a shop > place an armor stand with armor on it > unrent shop > re-rerent shop break the armor stand at least twice and now you have double items

Expected behavior The armor stand to break once and drop the items

Steps to reproduce

  1. Rent a shop
  2. place armor stand with armor on it
  3. unrent the shop
  4. rent the shop again
  5. break the armor stand
  6. acquire now duped items

Your environment tested on al latest version up to and including 2.6.0

Your config files

NLthijs48 commented 5 years ago

Upgrading to WorldEdit 7 (and WorldGuard 7) fixes this issue, these new versions allow me to disable saving/restoring of entities, which fixes this issue.

You are however running Spigot 1.12, so that is not an option, so what you can do to fix it is only saving a schematic when you create a region, instead of when it is rented. You can do that by changing the schematicProfile in the default.yml file to the following:

  enableRestore: false
  schematicProfile:
    created:
      save: '%type%-%region%'
      restore: ''
    deleted:
      save: ''
      restore: '%type%-%region%'
    rented:
      save: ''
      restore: ''
    unrented:
      save: ''
      restore: '%type%-%region%'
    bought:
      save: ''
      restore: ''
    sold:
      save: ''
      restore: '%type%-%region%'
    resell:
      save: ''
      restore: ''

I'll see if I can change AreaShop to automatically detect this situation and apply these changes.