Giter Club home page Giter Club logo

reltivlyobjectv / ethermarket Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 36.03 MB

This is a chestless shop plugin for Bukkit/Spigot/Cauldron. The shops are stored in a SQL database, and it's inventory, item descriptions, etc are all stored and retrieved from there. Players have the second line of the sign to write anything that they want, and the first time a shop is activated, the shop information is shown to the player instead of conducting a transaction. REQUIRES A UUID-COMPATIBLE VERSION OF VAULT (1.7.10 or later)

Java 100.00%

ethermarket's People

Contributors

reltivlyobjectv avatar

Watchers

 avatar  avatar

ethermarket's Issues

Buying Price Ignored - Selling Price used for both Buying & Selling

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:

  1. 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
  1. 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.

  2. 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

screen shot 2015-10-13 at 3 05 21 am

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.