MCTrade
**Project is undergoing MAJOR changes. I'd suggest not downloading files from this project yet! I need to re-factor the code quite a bit! **
Check out my site for better formatting and more detail: http://fogest.com/mctrade-plugin/

- Making trading a tad bit easier
Web Interface preview can be seen here: http://fogest.com/mctrade/
Download:
http://dev.bukkit.org/server-mods/mctrade/files/
Description:
MCTrade is much like that of WebAuctionPlus which is a trading plugin, with a web interface. WebAuction is a great plugin, and works great on peaceful-nonpvp servers. WebAuctionPlus posses a huge security risk when used on a PvP server.
MCTrade has been designed with the intention to be used on a PvP server as there are multiple features (listed below), that prevent any forms of abuse. Of course MCTrade works fine for non pvp servers as well.
MCTrade is designed to making trading: simple, fast, and secure. No one likes working hard for an item and then getting scammed by some jerk. With MCTrade you don't need to worry about that! All you do is, type in a simple command stating how much of the item you are selling, and how much of the item you are holding do you want to sell.
From there you can go online and view currently open trades and then go in game and purchase them via a simple command. There even is a configurable tax in place, to even further prevent some forms of abuse by using the trade system to store items.
Security:
Some of the features in the plugin to prevent abuse are:
- Tax on items(configurable) Attempts to make trading and then buying later on alt not worth the cost
- Player cannot accept their own trade or close their trade, though an admin can do this if needed.
- Trades can be closed by admins and have the option to return the items and tax OR to not give this back
- Trades can be deleted by admins, which removes them from display on the webpage and prevents them from being accepted and giving rep.
- Admins can monitor trade stats from the Admin Control Panel and also view players stats in game.
- Rep based system for users which will come into play in the future.
- Players must create an account, linking them to their trades which allows for easy monitoring.
- Accounts must be verified preventing users from putting in another users Minecraft Name
Commands:
/mctrade <item price> [item amount] Basic command to used to create a trade.
/mctrade accept <trade id> Command used to accept an existing trade.
/mctrade verify Command used in the website verification process to verify a user is who they say they are.
/trade Command used to administrate trades.
Permissions:
mctrade.* Gives access to all commands.
mctrade.mctrade Gives access all the /mctrade commands.
mctrade.trade.* Gives access to /trade which is an admin based command meant to administrate trades! As of now you may only give a user all of the /trade commands, eventually when more commands are added for the /trade command then this will be changed.
Configuration:
The configuration is explained in the setup but the examples are quite useful. The examples explain the variables:
Examples: http://fogest.com/mctrade-plugin/#examples
Setup:
- Place the file named MCTrade.jar in your plugins folder.
- Extract the folder named web and navigate into the php folder in there.
- Once in the php folder open config.php with some kind of text editor.
- Simply edit the fields with your database information. The config already contains examples, simply change those values, while making sure to leave the data in the quotation marks!
- You can now upload the folder labeled web to a directory on your website (probably using some sort of ftp client). Note, you can rename it the folder name to something other than web.
- Optionally; you can edit the logo (please leave the rest unless you ask for permission), by navigating to "layout\styles\images\blue\logo.png" in the web folder. Simply remove logo.png and put in your own logo labeled logo.png
- Now that the simple web part is done you now want to generate the plugin config. To do this simply restart the server (step 1 must have been done already).
- Now you should see a new folder in your plugins folder called "MCTrade", go into that folder and you should also see a folder called "config.yml". Open up this file using some kind of text editor.
- You now want to edit this file.
Examples: http://fogest.com/mctrade-plugin/#examples
Code:
This project is available on GitHub, feel free to make pull requests, or even PM me and we can discuss you being added as a contributor if you really want to help! Click the image below to be taken to the Github repo.
Credits:
WebAuctionPlus - Used a few bits of code. Specifically code relating to storing enchants in the database. http://dev.bukkit.org/server-mods/webauctionplus/

-
View User Profile
-
Send Message
Posted Dec 30, 2012-
View User Profile
-
Send Message
Posted Dec 30, 2012-
View User Profile
-
Send Message
Posted Dec 30, 2012@iancarroll
I'd wait a week or so to download and use this. A few things are broken in the plugin enchants not saving and durability not being accounted for. This is fixed in my latest build which is unreleased but a few website issues still need fixing first.
-
View User Profile
-
Send Message
Posted Dec 30, 2012-
View User Profile
-
Send Message
Posted Nov 29, 2012I am very glad to waiting. : )
-
View User Profile
-
Send Message
Posted Nov 28, 2012@dfdgsdfg
I hope next week it will be ready. If it's not totally ready, I will still try to at least make sure it works and release it. I really want to finish the web portion, as it's harder to update that. Then I can easily apply plugin updates. I'm busy this week, so there has been no progress, that is why the v1.1 is getting pushed to next week. Sorry about the wait!
-
View User Profile
-
Send Message
Posted Nov 28, 2012I (and our server's user) am very expect to your work. : -)
It must be cool and nice. Would you mind if I asked to ETA?
If you have a some plan please tell me about.
I am very thankful about it and not rellay hard to wait.
Cheers.
-
View User Profile
-
Send Message
Posted Nov 17, 2012@dfdgsdfg
Oh my god. I found the problem, and it's one of the dumbest things ever. All the values were being read in fine, but these values it seems were not actually being used, they were switched for testing. This was one line of code that was causing the issues. This has been fixed. I better get working quickly on v1.1 so I can fix this major bug.
-
View User Profile
-
Send Message
Posted Nov 17, 2012In my config.yml has
hostname: localhost port: 3306 username: minecraft password: password database: minecraftbut in my error message has
00:18:12 [SEVERE] [MCTrade] [MCTrade][MySQL] jdbc:mysql://localhost:3306/mctrade 00:18:12 [SEVERE] [MCTrade] [MCTrade][MySQL] Could not be resolved because of an SQL Exception: Access denied for user 'root'@'localhost' (using password: NO).I don't know why, anyway the config.yml does not reflect my server, I think.
I am going to test your new version, after that I'll report to you. Thanks. : )
-
View User Profile
-
Send Message
Posted Nov 16, 2012@dfdgsdfg
The current MYSQL is not changing though. I was unable to reproduce your problem you were receiving. I tested the MYSQL both locally and remotely, and both worked fine, which you can see from the website. I also have had a few others test it, and still was unable to discover your issue. If need be, I can help you via Skype's screenshare or Teamviewer.
-
View User Profile
-
Send Message
Posted Nov 16, 2012@fogest
I am very excited to it. If I get it, I'll test and report to you.
Thanks for your nice work!
-
View User Profile
-
Send Message
Posted Nov 15, 2012@dfdgsdfg
By the way, good news. The new website using Twitter Bootstrap and Datatables should be ready soon! The registration process on the website is also WAY easier, so if your having issues now, try downloading the latest files and trying again in a weeks time or so.
-
View User Profile
-
Send Message
Posted Nov 14, 2012@dfdgsdfg
Do other plugins work using this same MYSQL info? I know some web hosts that do not allow external connections to the database, so I just want to verify that others work.
-
View User Profile
-
Send Message
Posted Nov 14, 2012Java : Oracle Corporation 1.7.0_09 (http://java.oracle.com/)
Operating system : Mac OS X 10.8.2 (x86_64)
Implementation : git-Bukkit-1.4.2-R0.2-b2455jnks (MC: 1.4.2)
I really did set up my
config.ymlin MCTrade folder. Web fronted works fine withconfig.phpthat is just same asconfig.yml. Am I miss something?-
View User Profile
-
Send Message
Posted Nov 13, 2012@dfdgsdfg
What it looks like is an error in connecting to the database itself. The database connecting I know works, as I did a lot of testing with this. Please verify that you have the right info entered. The message is telling you that access is denied, meaning your info is probably wrong.
Also I have been very busy lately, but I myself want to also redesign the website and use Twitter Bootstrap. Currently what is being used is a template that has been modified. I wanted it to look good, as I'm not creative and did not have the proper knowledge to make it look so nice from scratch. I have kind of started on making a new version of the site that may feature better security for passwords, and a simpler registration. Of course this may be a little as I'm quite busy with school, and I'm not the best with web design.
-
View User Profile
-
Send Message
Posted Nov 13, 2012Nice plugin! Thanks a lot.
I did set up my
config.yml, but I've got some error like below.00:18:12 [SEVERE] [MCTrade] [MCTrade][MySQL] jdbc:mysql://localhost:3306/mctrade 00:18:12 [SEVERE] [MCTrade] [MCTrade][MySQL] Could not be resolved because of an SQL Exception: Access denied for user 'root'@'localhost' (using password: NO). 00:18:12 [SEVERE] Error occurred while enabling MCTrade v1.05 (Is it up to date?) java.lang.NullPointerException at me.fogest.mctrade.SQLibrary.MySQL.checkTable(MySQL.java:165) at me.fogest.mctrade.DatabaseManager.confirmTables(DatabaseManager.java:53) at me.fogest.mctrade.DatabaseManager.enableDB(DatabaseManager.java:43) at me.fogest.mctrade.MCTrade.onEnable(MCTrade.java:78) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:374) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:272) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:254) at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:581) at org.bukkit.Bukkit.reload(Bukkit.java:183) at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:22) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:185) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:504) at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:496) at net.minecraft.server.DedicatedServer.al(DedicatedServer.java:251) at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:216) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:495) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:428) at net.minecraft.server.ThreadServerApplication.run(SourceFile:818)Suggestion
How about twitter bootstrap and data table for your web-fronted? Your design is good, but bootstrap is also nice and quite well maintenanced.
-
View User Profile
-
Send Message
Posted Nov 8, 2012@sleite
mySQL is very efficient and I don't see a reason not to use it. Considering that you could have a lot of trades I was looking to be the most efficient as possible.
-
View User Profile
-
Send Message
Posted Nov 8, 2012Not a big fan of setting up mySQL. Anyways to use another database method? I've seen many plugs that use sql but there's nothing to install. I think it just downloads and installs itself as a plugin.
-
View User Profile
-
Send Message
Posted Sep 30, 2012@JETFIRE007
Did you also make sure to edit the config file for the web portion? Also could you maybe link me to a screenshot of the website, so I can see what the issue is ? Thanks.
-
View User Profile
-
Send Message
Posted Sep 30, 2012Hi, I've installed your plugin, now that I got MYSQL to work, and it seems like the site is having errors. Nothing shows up, just a small text welcoming me to MCtrade.
Is the web portion dependent on something else?
Thanks.