Zerthick / PlayerShopsRPG

A Minecraft Sponge PlayerShop Plugin
https://ore.spongepowered.org/Zerthick/PlayerShopsRPG
GNU General Public License v2.0
7 stars 5 forks source link

Plugin broke with weird item in shop #25

Closed Whazaaaaa closed 7 years ago

Whazaaaaa commented 7 years ago

Hai It seems that someone put an item in a shop that the plugin doesnt like. Any idea what it could be? This is what i get on startup: https://pastebin.com/kmCsDgNT

Whazaaaaa commented 7 years ago

shops.zip If you're intrested in the shop file.

Zerthick commented 7 years ago

Most likely something with custom data from another plugin.

Whazaaaaa commented 7 years ago

How do I check/fix this?

Zerthick commented 7 years ago

Working on it, I've determined is has to do with the items from the draconicevolution mod that are within some of your shops. I'm now trying to determine if this is due to an issue in my code, sponge itself, or the mod specifically.

Zerthick commented 7 years ago

Ok, so it may not specifically be the draconicevolution mod that is the issue. What appears to be the issue is that at one point or another you had a mod installed and somebody put an item from that mod in their shop, but then you later removed that mod. So now what happens is when the plugin loads up it attempts to recreate that item, however since that item no longer exists it freaks out, make sense?

Whazaaaaa commented 7 years ago

It sadly does not seeing as I've updated the pack a week before this issue came up. Meaning that I dont think I can be that as it didnt emediately happen after a modpack update. Edit that update was even 3 weeks ago.

Zerthick commented 7 years ago

Hmmm, that leads me to believe that one of the mods in the pack isn't registering their items soon enough and this only now occurred because someone just added the item to their shop. If this is the case I can release a patch that will hopefully resolve the issue, however without a link to the modpack you are using I won't be able to test it.

Whazaaaaa commented 7 years ago

This is what I currently use: https://www.feed-the-beast.com/projects/ftb-presents-skyfactory-3/files/2418190

Whazaaaaa commented 7 years ago

While you're maybe doing a hotfix someone found a very easy dupe bug 1) create a shop 2) add an Item to sell to the Shop 3) restock the shop with /shop item add while holding the item in your hand 4) it doesnt take the item out of your inve when you add it to the shop, so just buy it back from your Own shop for a price of 0 and bam, you have double the items

Have not tested this myself but I was told this dupe.

Zerthick commented 7 years ago

What version of Sponge?

Whazaaaaa commented 7 years ago

spongeforge-1.10.2-2281-5.2.0-BETA-2379

Zerthick commented 7 years ago

I have not be able to replicate this dupe on the latest stable version of SpongeForge 1.10.2-2281-5.2.0-BETA-2407 and PlayerShopsRPG v2.0.0

Whazaaaaa commented 7 years ago

Ill restart my server and try it with the latest

Whazaaaaa commented 7 years ago

Apparently I was misinformed. This dupe only happens on my AllTheMods2 https://minecraft.curseforge.com/projects/all-the-mods-2/files/2439222 with spongeforge: spongeforge-1.11.2-2315-6.1.0-BETA-2398 But seeing as this is a API 6 issue and 1.11.2, I guess there not much to be done besides a whole new version.

There was another dupe/infinite money one I've heard of. But the player that told me is currently online so Ill come back to that later.

Whazaaaaa commented 7 years ago

Okay so this is a big dupe that still works.

  1. Make shop
  2. Add whatever item
  3. do /shop item remove # -10 and it will add 10 items with no cost

So adding the minus f's up the system. I thought it already checked for a minus I thought I read in some changelog. But I guess not. I tested this myself and it works :/ http://recordit.co/2FQlAK4GXW That is a recording of me doing it just now if that helps.

Zerthick commented 7 years ago

Please create a separate issue for it and I'll be sure to patch it asap.

I've determined it's the withercrumbs:crumb_star that appears to be causing the issue, I'm now trying to figure out why.

Zerthick commented 7 years ago

Ok, it's as I expected, it registers its items late, I'll have a patch out soon :smile:

Zerthick commented 7 years ago

Should be fixed in v2.0.1!