Hello! Thank you for writing this plugin. It's clean and efficient (almost too efficient) but there is a problem:
When a customer (the non-shop owner) tries to buy from the shop, it only charges them the selling price.
So for example: on my testing server I have a shop selling DIRT with the following parameters: B 2 : 1 S. The customer starting with 0 units of currency can sell his 10 blocks of dirt and get 10 units of currency, as expected. He then has 0 blocks of dirt, and 10 units of currency. When he goes to buy the dirt, it should charge him 10 currency for 5 blocks of dirt (2 currency for each purchase), but instead he buys them also at 1 currency each... despite the sign parameters.
Testing:
- I tried this on both Spigot 1.7.10, as well as kCauldron 1.7.10.
- I also tried switching Economy plugins. I used a default configuration of the Economy plugin Gringotts (item-only currency) using emeralds, as well as a default configuration of CurrencyCore (virtual-only economy).
- In all cases, I was using latest Vault (1.56) with no other plugins present, and no modifications or customizations.
Additional Observations:
- In the console it shows the transactions (both buying, and selling) as costing 1 unit of currency either way. So with the sign set to B 2 : 1 S
[EtherMarket] [Transaction] fb7ffffb-084b-4146-b14d-14271f59cdfa bought 1 items (ItemStack{DIRT x 1}) through a shop belonging to b3994bc6-469e-4e7d-85e9-d95cb22b030f for 1.0
[02:32:48 INFO]: [EtherMarket] [Transaction] fb7ffffb-084b-4146-b14d-14271f59cdfa bought 1 items (ItemStack{DIRT x 1}) through a shop belonging to b3994bc6-469e-4e7d-85e9-d95cb22b030f for 1.0
[02:32:48 INFO]: [EtherMarket] [Transaction] fb7ffffb-084b-4146-b14d-14271f59cdfa bought 1 items (ItemStack{DIRT x 1}) through a shop belonging to b3994bc6-469e-4e7d-85e9-d95cb22b030f for 1.0
[02:32:49 INFO]: [EtherMarket] [Transaction] fb7ffffb-084b-4146-b14d-14271f59cdfa sold 1 items (ItemStack{DIRT x 1}) through a shop belonging to b3994bc6-469e-4e7d-85e9-d95cb22b030f for 1.0
[02:32:49 INFO]: [EtherMarket] [Transaction] fb7ffffb-084b-4146-b14d-14271f59cdfa sold 1 items (ItemStack{DIRT x 1}) through a shop belonging to b3994bc6-469e-4e7d-85e9-d95cb22b030f for 1.0
[02:32:49 INFO]: [EtherMarket] [Transaction] fb7ffffb-084b-4146-b14d-14271f59cdfa sold 1 items (ItemStack{DIRT x 1}) through a shop belonging to b3994bc6-469e-4e7d-85e9-d95cb22b030f for 1.0
-
Looking at the Shops table in MySQL in real-time, there is only 1 entry (this one sign shop). And it shows the current prices there.
-
When the shop owner or the customer first hits the sign it shows the correct summary in the Minecraft client chat window of the buy and sell price there (as is indicated on the sign).
It's simply behaving as though I put in the same buying and selling price!
Please note, I tried other Buying and Selling prices, all with the same result (the "selling" price being incorrectly used for "buying" as well).
To be clear, everything else I tested works great with this plugin. Everything works fine for the shop owner, and the block protection works great. The customer (me and a second computer/Minecraft account) was not op'ed.
I'm pretty sure it's a simple coding error.
Below I've attached a screenshot of the transactions in MySQL, again, with the sign parameter of the 3rd line set to B 2 : 1 S, as well as a screenshot of the Shops table showing the Buy price as set to double the selling price.
![screen shot 2015-10-13 at 3 04 05 am](https://cloud.githubusercontent.com/assets/15102812/10450567/5f907cce-7158-11e5-9139-fcb15444154f.png)
![screen shot 2015-10-13 at 3 05 21 am](https://cloud.githubusercontent.com/assets/15102812/10450500/ddc948c4-7157-11e5-8532-4d4e7da2e59b.png)