Hello, I am in need of a simple plugin which gives users the ability to store xp in a physical bank or virtual bank through commands. I thought of this when I realised members on my server will keep losing xp on my server. (Its PvP) - The Basic Idea - A user would like to store his exp. He types /xpbank deposit 10 This deducts 10 exp from him and stores it. MySQL would be cool. The user wants his exp back. He types /xpbank withdraw 10 This gives him his 10 xp points back. - Commands - /xpbank deposit <number> /xpbank withdraw <number> Sorry but I can't offer anything. Thanks
I might be up for this, would you like a physical bank, one through commands, or both and you choose?
I'm sorry I thought MySQL is better. Your more experienced than me! Thanks thats great! I'm not sure, which would be better? How about a Physical Bank. When you walk in, you're able to use the commands OR you right-click some kind of block or sign then use the commands OR the commands and I use a command-on-sign plugin to use inside of the bank? Your view? Also, I don't want this as a private plugin, merely an plugin I could use but can be useful to the public as I have seen because there are loads of requests for something like this. P.S - Same avatar = Awesomeness
MySQL need a server (and only under windows) to run, if the server is the same of minecraft server, all bytes will pass to the MySQL service to finally be write on the disk as a file and that will simply slow down minecraft... If that not the same, you can add the network's ping delay… Even if you need a database more evoluated, MySQL can get the task easier...
I don't know but everyone on my server is asking if they could store exp somehow and i said i would look into ti.. I was wondering if there's anyone working on this or maybe progress? It would be pretty awesome
What a load of crap MySql is available on Unix/Linux OS's INC MAC http://www.mysql.com/downloads/mysql/5.5.htmleven the workbench tool to manage the server cane be run on almost all OS's http://www.mysql.com/downloads/workbench/5.2.html MySQL does not constantly write to disk it loads requests into ram for a short while, Even the parts that do require disk access are easy to avoid mixing up with Minecraft as anyone who installs Minecraft Servers on the same drive as their operating system is a fool, unless the worlds are running on ram disk http://stackoverflow.com/questions/1000595/is-it-possible-to-load-a-database-in-the-ram MySQL actually uses less HDD activity than Flat file in the long run as flat files become large esp when dealing with many users they quickly become bulky slow loading files SQLite or even full blown MySQL fixes that issue Moving everything of any plugin that is designed to hold large amounts of player information be it chat,command use,block logs,Currency anything at all that will be written to a lot and read lots that will become large should ALWAYS be stored in SQLite or MySQL as at this point flat file becomes the slowest storage method. For this plugin your three options should be SQLite or MySQL or Both, SQlite does not require any setup or any server to actually use its less complicated to setup but has draw backs such as its not as efficient as Mysql can be or as useful in terms of ability to grab the data for display on websites/stat pages. There are many free SQLite database managing tools I have one on my server its a simple tool to open the database like into a readable file much like excel then I make my edits save/close. MySQL is the better if you already have many plugins (3+) that all use an SQL database and if they all support MySQL then your far better of creating the server and learning how to manage that and let all plugins + future ones take advantage of it. Like I said above the more things you run that require reading and writing a lot to flat file will in the long run become worse for you server than actually taking the plunge into SQL. Granted SQL is not all that better for a lot of flatfile use like config files or anything that is not read and written to often. But the general rule of thumb is if your going to be storing over 1000+ users all with data attached SQL is the way to go as at this point Flatfile becomes bulky and slower read/lookup times. Of course a lot of what I said REALLY depends on the environment it is used on and how it gets used many factors will play a role in if SQL will end up better for you or not but that is what competency comes in handy for.
Ok I'm working on it, I'll see if I can make some progress today. There doesn't seem to be a method I can use to get a player's experience, only percentage toward next level up.. I've still got the project set up and I'll work on this when the method is available. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
getTotalExperience() in Player should fulfill your needs mate, there is also getExperience(). That should kinda do it .
I was toying with this, and both of the ways suggested (getTotalExperience() and getExperience()) are obsolete in more recent 1.0.0 builds. The giving of XP doesn't work either though, it won't update. I would wait for craftbukkit for 1.0.0 to be perfected before working with XP.
Ok, sorry for my errors. Did you try with the last build ? Here ! EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I never planned to have MySQL support. Personally, I'm a database hater... Would prefer coding with flatfiles any day over a database
If you don't have more than 1000 players in the same time, it's really stupid to force user to create a database...
Hahah! Hi there! Yup. After making my inventory saver request. I wanted to start learning, because if something comes into my head...I want to just, make it myself. ^^
@Shuski Thanks man! This is really helpful! One tip, you should add Permission support and another command to credit someone with xp @Everyone talking about MySQL I thought that if a server gets loads of people and they store their exp, it makes some kind of file so I pretty much thought of iConomy, it stores xp data instead of money data Sorry if this is wrong! Thanks anyway and to shuski
It has permissions support. (Perms 3 probably wont work...update from it!). As for SQL. The file literally holds. Player: #. That's it. It shouldn't put strain on it.