Gringotts

Gringotts

53.6k Downloads

Item not being consumed based on stack location

jastice opened this issue ยท 1 comments

commented

From Bukkitdev tickets:
http://dev.bukkit.org/server-mods/gringotts/tickets/7-item-not-being-consumed-based-on-stack-location/#c2

What steps will reproduce the problem?

  1. Have a plugin that uses commands and costs money to execute them
  2. Place enough of your money (w/e your using) in your inventory
  3. Put 1 of your money items in your first slot of your hotbar, and the rest in the last slot of your hotbar, execute the command.

What is the expected output? What do you see instead?
Example: Faction create, cost 20 'gold'; 65 gold, 1 in first slot, 64 in last slot. What should happen: 45 gold left. What does happen: 64 gold left.

What version of the product are you using?
1.4.2 (with Latest Vault!) - reproduced for 1.5.2 and 2.0
Using Tekkit with BukkitForge (possibly not Gringotts issue?)

Do you have an error log of what happened?
No crash, so no error log... just my observations in game.. testing this plug before pushing it to my live server

Please provide any additional information below.
Hey, I've got an oddity of a bug that I've encountered, perhaps you can help me out...

I love your plug, I'm terribly happy with results so far... With one exception, there seems to be a bug based on where you place the stacks of items in your inventory... See, say I have something that is going to cost 20 "coins" or whatever your using for your physical currency, and I have 65 coins, one coin in the first slot of the hotbar, and 64 in the last slot. When I purchase the item, I get it! Victory, mod working properly! Wait. I still have 64 coins!!! Exploit, victory. Well, as a server admin, not so much. :D I confirmed it is location and stack based, switch the 64 to the firsthand and viola, the 20 is deducted properly, but leave say 56 at the end and fill the hotbar with 1 each, you multiply your effective money by an astronomical amount! Bad things.

Take a look see and see what you think. I haven't tried this with something like chestshop, the bug is occuring when using a command that costs money, for example, a factions create new faction command costing 20 coins has the exact problem explained above..

Thanks in advance!

Oh and I'm using v1.4.2 and the lastest Vault release (dunno why I'm using an old version of your plug... I'll update if that'll fix it, but your changelog didn't point out this bug so I didn't try that yet! Do tell if I'm dumb and you got this fixed but didn't specifically mention it... thanks again!)

commented

Apparently it's an issue with ForgeBukkit