Credits
Commands and Permissions | Setup | Videos
Introduction
Credits is a secondary economy plugin, meaning that it is not meant for usage like the Essentials economy, iConomy, et cetera. The plugin is built around being able to purchase certain amounts of credits through third-party websites (or earning them, a functionality added by add-ons or other plugins) and buying packages set up by server administrators in-game. Upon purchase of the packages, specified actions will be executed. This tool has been made specifically to assist low-budget servers running internet stores that are unable to afford their premium services.
Before you download
This plugin is bundled with both Gravity's updater and bStats. If you dislike either, you may turn them off in the configuration files found in their respective folders.
The updater does not and will not download anything unless the update command has been executed. That said, if you do not want to be notified of a new update at all, you may disable the updater in the Credits configuration file separately as well.
Features
- Package purchases with GUI or commands
- Executing commands, manipulating permissions
- Timed packages (purchase, expiry actions)
- MySQL storage & sync
- Developer-friendly events and functions
Donation
Most of my projects are worked on during my spare time. I would greatly appreciate being supported on Patreon (or a one-time donation on the top-right of this page), so that my time is not spent in vain. Thank you!
Contributing
Alternatively, to assist me in keeping this project alive and well you can contribute directly to it's GitHub repository. Unsure what to do? Check out the Trello board for a quick start. You can also join my Discord server for a quick chat.
@ravand
School happened. Almost every day I have a test to prepare for, and that takes a lot of time. Then, I have to do a lot of homework, and after I only have about an hour for myself. I also have a ton of projects that are work in progress right now, so not much time can go out for the plugin. But, on the bright side, you can expect an update somewhere this month (or even week), with tons of bugfixes and new features (multiple commands & permissions support!)
So whats going on with the development of this plugin? Atm its really only working with a few workarounds.
<<reply 1973229="">>
Very easy. Ask me on Skype
@999Mockingjay999
As I've already said, you can do this with PEX. But, since it's a very common request, I'm going to try to add it in the next release.
Also, when you have the time, could you look into making it possible to also buy a permission using only commands? That way I could hook it into power tools, signs, or another GUI. Thanks
Another side note, I'm incredibly sorry for the lack of updates! My PC has been completely destroyed, school is coming and I don't have much time! You can get my code on GitHub and edit it yourself until I get back!
@999Mockingjay999
Item IDs are no longer supported by Bukkit, and I don't want to put in all of the item codes one by one at every update.
I'm going to use other plugins (/APIs) to hook into and display the credits amount, because making a separate scoreboard for displaying credits only seems a bit extreme.
Also, could you look into changing the code from something like, "material.getConfig().getString("Material')" to "material.getmaterial(getConfig().getInt(materialID)"
It would also be really great if you could add the ability to use byte data in the id codes.
The way that you have it set up at the moment, isn't as simple as it could be.
Hey, would you be able to look into a scoreboard that you could enable on a per world basis, that would show your credit balance?
@Vensky123
By command.
How does player earn credits?
@ImCradzz
The semicolon bug should be fixed in the next version (bugfix), and multiple commands coming in the next major-ish version (v0.3).
You can't use items with : in them (for example, a regeneration potion 373:8257) shows a rather large error in the console and says "An internal error occurred while attempting to perform this command" in-game.
Also, would be nice if instead of only 1 command, it could run multiple commands.
@CrazehGhost
You should be able to do this with your permissions system. In PEX there's a command for that, but not really sure about other permission plugins.
Could it be possible to have it so credits can buy permissions for the user? (e.g. Buying the right to have access to the /nickname commands)
@seriosbrad
The next build will fix this. It'll come out in a few days.
@ThaPengwin
Here you go
http://pastebin.com/NNBwLZSZ
@ThaPengwin
Awesome glad i could help :P Hope the next version comes soon enough
For now i will add a cron that sends a command to my screens giving credits to a dummy player
@ravand
You're completely right - the connection gets terminated after an interval of inactivity, thus making the plugin incapable of doing anything. Getting a fix out for this soon!
Ok ThaPengwin
The mysql problem happened again, freshly new databse for the credits table and after around 10 hours of updtime the shop doesn't work anymore and you cant do /cred balance always gives an internal error.
Here again an error log, i also noticed that i didn't send you the whole error log last time it is a really huge one :P
http://pastebin.com/u3cpFuzf followed by this http://pastebin.com/SbkP9vrN
What really stands out from the error log is this line:
"Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 48,028,697 milliseconds ago. The last packet sent successfully to the server was 48,028,698 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem."
EDIT: I think the problem is, that your plugin drops the connection after a while when noone gets or interacts with credits. Maybe add a connection heartbeat every 5 minutes or so?