MC Web

877 Downloads

* Current version beta 1.6 *
* Tested with Bukkit 1.4.5-R0.3 & Tekkit 1.3.1 *
* Requires: iConomy 6 *

* About *

MC Web is an open source plugin, that provides an easy to use file system interface for web developers to use. With MC Web, you can easily transfer items and money from MineCraft to your web application, and back again ( It even handles web account creation from inside of MineCraft ).
MC Web file system is compatible with ANY language that can process text files.
Examples of things that can be made as a result of MC Web include: Online auctions, online stores, online exchanges, web games that utilize MineCraft items / money, online casinos, social games, and so much more !
Eventually I will be including working PHP templates to help web developers.

* How To Install *

1: Download MC Web ( "Files" tab )
2: Drag the .jar file into your Bukkit "plugins" folder
3:(re)Start your server

* Configuration *

When MC Web is ran for the first time, it creates all the basic files that it needs. Under "MC_Web" folder you will find 2 configuration files - "Banned_Items.ban" and "MC_Web.config".
MC_Web.config
In this file you will fine the different configuration settings for the plugin ( defaults shown ):
Allow_Money_Export=true - allow money to be transferred to web account
Allow_Money_Import=true - allow money to be transferred from web account
Max_Money_Per_Day=-1 - Not Implemented Yet
Money_Name=Gold - Name of the currency
Allow_Material_Export=true - allow items to be transferred to web account
Allow_Material_Import=true - allow items to be transferred from web account
Max_Material_Per_Day=-1 - Not Implemented Yet
Auto_Delete_Banned_Player_Account=false - Automatically delete banned players accounts when server starts

If you accidentally mess up this file, simple delete it, and next time the server starts, a new one will be created for you.

Banned_Items.ban
Items listed in this file will not be allowed to be uploaded to the player's web account.
Currently uses Bukkit material names - http://jd.bukkit.org/apidocs/org/bukkit/Material.html

* Commands *

There are several ingame commands that can be used with MC Web:
"/mc_web" - brings up help menu
"/mc_web account create <password> <nickname>" - Create a web account. Players can only create one. Login Name is the player's MineCraft name, while nickname is the name displayed after the player logs into their web account.
"/mc_web account reset <password>" - resets the password
"/mc_web item deposit" - deposits all of the same type of items in the players inventory, that the player is holding. Will not deposit air or banned items. Items goes to the player's "in box".
"/mc_web item withdraw" - withdraw all the items from a player's "out box" to their location.
"/mc_web money deposit <amount>" - if player has enough MineCraft money, deposit <amount> into web account
"/mc_web money withdraw <amount>" - if player has enough web account money, withdraw <amount> from web account

* Developer Documentation *

[Note:] Any one who wished to view the source code, can find it inside of the .jar file, under the "Source" folder. The source code does contain comments that point out all the main parts of the project and what they do, however is it not written for beginner programmers.
It is also noted that SQL is NOT required to use MC Web.

Files -
Inside of the "MC_Web" folder, you will find another folder named "Users". Inside of this folder you will find the folders of all the user created accounts. The folder names are the same as their MineCraft accounts.
Inside of the user folders you will find all the relevant files pertaining to the account:
Account.acc
Blarg.acc
In.box
Out.box

Account.acc - the first line contains the money the player has deposited into their account in (decimal / double / float) format
Blarg.acc - contains the account information. First line is the nickname the user chose. Second line is the password. Third line is a unique user number that has been generated for the account - this helps to stop cookie and header spoofing.
In.box - contains all the items that the player has deposited. This is a temporary holding "bin" untill the materials are processed into the web application(s). The format is Bukkit_material_name|quantity.
Example:
SAND|60
DIRT|250
STONE|85
Out.box - contains all the items that has been designated to be deposited into the player's MineCraft account.. This is a temporary holding "bin" untill the items are withdrawn. The format is Bukkit_material_name|quantity.
Example:
SAND|60
DIRT|250
STONE|85

* Notes & Plans *


  • Eventually I plan on releasing functional PHP templates
  • Currently durability and enchantments can not be implemented. I am having many issues parsing that information.
  • Max items / money transfer has not been written yet
  • Web point system may be added eventually
  • Web rank system may be added eventually
  • Web title system may be added eventually
  • Web groups may be added eventually
  • Web leader boards may be added eventually

* Version History *


  • B1.6 - added auto delete functionality for banned accounts
    added banned items list.
  • B1.5 - improved anti user abuse measures
  • B1.4 - added money functionality
  • B1.3 - added item functionality
  • B1.2 - added commands functionality
  • B1.1 - added commands tree
  • B1.0 - added file system