StockCraft
StockCraft - Trade real stocks in Minecraft
Stock api updated,
- Looking up stocks now goes faster!
- 15 minute delay from Yahoo again.
This is the continuation of the original StockCraft made by @henning77 But I couldn't reach him for 15 months... And the plugin has not been updated since, untill now!
Features:
- Buy and sell real stocks in Minecraft (courses from finance.google.com)
- Compare profit with other players
- More
Requirements:
- MYSQL Database
- economy plugin
- Permissions
- Vault
How to install:
- Install MYSQL Database if not available
- Install the missing plugins (iConomy,Permissions, Vault)
- Download the rar archieve
- Extract it to plugins
- Add Stocks with /addid or load example list with /addidlist examplelist
Config File:
Edit your config file to access your database and to activate some functions!
- shorten=false -> change to true if you want to activate shorting (Check Wiki!)
- Vault=true -> change to false if you want to use an old iConomy Version
- fee=0 -> If you want a trading fee, you can set one here. (percentage of money paid for stocks!)
- minimumfee=0 -> Here you can set a minimum fee! (You can leave fee=0 and set a static fee!)
database:
- host: localhost
- port: '3306'
- database: stockcraft
- username: root
- password: ''
Commands:
- /stock help -> Help
- /stock ids [page]-> Shows the stocks that are available
- /stock ids symbol [page]-> Shows the symbols of the stocks that are available
- /stock ids s [page]-> Shows the symbols of the stocks that are available
- /stock course [id] -> Shows the course of the stock
- /stock list -> Shows your stocks if you have some
- /stock buy [id] [amount] -> to buy stocks
- /stock sell [id] [amount] -> to sell stocks
- /stock top -> Top 10 with the highest profit
- /stock add [id] [symbol] -> adds a new stock to the id list (you can find the symbol on finance.yahoo.com!)
- /stock addlist [name] -> adds new stocks from a file (examplelist: /addidlist examplelist) in /plugins/StockCraft/
- /stock remove [id] -> removes stock from the id list
Permissions: default to op.
- stockcraft.addid -> add this to permissions plugin to allow admins or mods to add stocks
- stockcraft.removeid -> to allow admins or mods to remove stocks
- stockcraft.commands.* (only needed if you set detailedpermissions = true in stockcraft.cfg)
- stockcraft.commands.course
- stockcraft.commands.stockbuy
- stockcraft.commands.stocksell
- stockcraft.commands.stocktop
- stockcraft.commands.stocks
- stockcraft.commands.ids
- stockcraft.commands.stockhelp
Examples for stocks (with symbols):
- BMW BMW.DE
- DeutscheBank DBK.DE
- Lufthansa LHA.DE
- Commerzbank CBK.DE
- Telekom DTE.DE
- Infineon IFX.DE
- SAP SAP.DE
- Siemens SIE.DE
- SONY SON1.F
- ACER ACX.MC
- Oil CLK11.NYM
- Gold GCJ11.CMX
- Gas NGK11.NYM
Example:
- /stock add BMW BMW.DE
Get new stocks:
If you want to add new stocks go to finance.yahoo.com and check the id
after that add the id in Minecraft:
- /stock add BMW BMW.DE
Donate:
Donate if you like this plugin!
LOL I made a list of all NYSAQ stocks (over 3000) and i come to load them it loads good but… the pluging can only hold 200 :l really great plugin tho it would be so cool if it could hold more than 200 maybe 3000 LOL, nah but i dont know how to delete the 3000 stocks i put it it does not work kuz there are over 200 please help! ty
If you want this list take about 2800 stocks out of it. so here is the link enjoy =)
Click This
Amazing plugin! certainly worth to try it!
It would be great if we could add/delete and manage ids from the command window :)
@SQ10
added.
I use PEX and iConomy, so it would be great if the new version of StockCraft which doesn't have Vault dependency supports those plugins :)
@Tombikos
It is, but next time you should try it out!
I am using PEX and Fe economy plugin. Is it compatible? Because this looks pretty good :)
Did a minor downgrade to java 6
@Ackoco
No, school is in the way.
edit: wait, the newest one isn't in java 6?
@BlockCat Not wanting to be pushy, but have you given any thought about making it compatible with java 6?
@whitepony03
Thank you so much for pointing this out! I'm working on this.
I've ran into an issue testing Shorting, my knowledge of stocks is limited but I have an understanding of shorting. When testing it I ran into 2 issues:
1) Let's say I want to short VXX at 10.00 a share. My current balance is $1000.00, if I short 100 @ $10.00 my balance stays $1000.00. I now have -100 in the database right? Let's say I turn around instantly and 'buy' it (since I shorted it): the trade goes through, I buy 100 shares at $10 and I now have $2000.00. Instead I would expect my money to stay $1000.00.
Here's how I would expect the scenario to go down:
2) The issue above is ideal but still has an exploit. A new player comes on an shorts 10000 shares, you loan them the stock they don't own, their balance is $100,000 and they can buy whatever they want with it. Storing this 'loan' in the DB instead of passing it to Vault may be the best solution.
TL;DR - shorting can be exploited - it costs nothing and pays the player when you 'pay' the stock back.
Screenshot via dropmocks.com (look at the money balance as I run the commands)
I tested it (could've done that in the first place) and it does indeed work with CraftConomy3 as you suspected. Thanks for getting back to me so quick.
Very interesting to tap into real markets, can you imagine running a server with a population of 30+ and everyone complaining about a split!
@whitepony03
It uses vault, to make it compatible with most major economy plugins.
Hey BlockCat. Been looking for a Stock market plugin to replace another one that just wasn't working right, thanks for putting this together.
My question is: since this likely hooks into vaults API does it have to use iConomy to perform the transactions? I'm using CraftConomy3 instead but it still talks to Vault without issue.
Thanks again
@Ackoco
No it's I just have to switch 6 to 7 edit: somehow/
@lol768 this would be amazing. unfortunately my hosting company is only running java 6.0 :( is it a really hard job to do?
@BlockCat
You should be able to change the referenced JRE to 1.6 (unless you're using Java 7 features). This is a bit of a pain however.
@Ackoco
oh, this. It seems the java version on your server is: Java 6. The plugin is compiled for: Java 7, Java 6 will not run plugins compiled in Java 7
@BlockCat yes they are both installed and got other plugins also connecting to my MySQL database. however I twist or tweak it, stockraft just spills out the error. do you think it has to do with Tekkit? here is my error at startup: edit: Bukkit SQL also throw up a similar error
2012-09-04 18:56:46 [SEVERE] Could not load 'plugins/StockCraft.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: StockCraft/StockCraft : Unsupported major.minor version 51.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:151) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:310) at forge.bukkit.ForgePluginManager.loadPlugin(ForgePluginManager.java:55) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:231) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:221) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:197) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:59) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:177) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.UnsupportedClassVersionError: StockCraft/StockCraft : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:140) ... 9 more