CashFlow
CashFlow is an economy plugin that lets you create taxes and salaries that pay out at an interval you set. Compatible with iConomy 4, 5, & 6+, BOSEconomy 6 & 7, Essentials Economy 2.2.17+, and MultiCurrency. Permissions plugin optional but recommended - pick from PEX, bPermissions and PermissionsBukkit.
Requirements:
- Register (Versions 1.0.1 and up use Vault)
- An economy plugin - BOSEconomy, MultiCurrency, Essentials Eco, iCo4/5/6
- A permissions plugin - PEX, bPermissions, PermissionsBukkit
Features:
- Uses the Register API, so it is compatible with multiple economy plugins.
- Supports PEX, bPermissions, and PermissionsBukkit.
- Create multiple taxes with different amounts, intervals, and players receiving the tax (or no player receives the collected tax). Apply taxes to one group or many. Gives you the ability to add players to an "excepted players" list so if someone isn't going to play for a while you can freeze their tax without having to remove them from a group.
- Create multiple salaries with different amounts, intervals, and players paying out the salaries (or no employer). Apply salaries to one group or many. Add players to an "Excepted Players" list so you can freeze their payment if they're going to be away, without having to remove them from a group.
- Hits offline players.
- Set salaries and taxes to pay only to players who have been online within a certain number of hours.
- Supports non-player economy accounts.
Commands and Permissions
Tutorial
To Do:
- Commands to edit taxes (maybe).
- A little code cleanup.
- More permission nodes
- Percentage based salary
Trello Dev board
Visit the Trello board to see the current todo list for all projects.
You can comment and vote on any of the topics there.
All changes on the Trello board are in real-time.
If you decide to download this plugin please leave me a comment to let me know how it works for you so I can improve it! And if you like this plugin, please consider donating. It's a big incentive to continue this, and it helps me pay for things I need for school.
@Underbalanced
I never said iConomy wasn't widely used. Heck, I prefer it over the others. However, since the original release supported multiple economy plugins, I have to consider those and provide full support for those as well.
Just like how I detest GroupManager, due to (still remaining) issues with getting CashFlow at least partially compatible doesn't mean that I'm at liberty to remove support of a dependency that some of the user base has. Well, actually, I could, if I were a mean and unsupportive developer.
And modifying another plugin's SQL table doesn't appear as a good gesture... and could lead to potential upgrade / update issues in the future. For instance, say the economy system gets an update that changes the schema for the database. The original dev is expecting only their information to be there, and thus will only transfer over the information relevant to the original plugin. Thus, any data that I append to their table will be lost.
@Mitsugaru
More modified some variables and the MySql areas of your plugin. I do not agree that it is very specific. MySQL and iconomy are widely used. As i said it is MySql, it would not function for a flatfile person as I did strip the listener.
You can still expand in an iconomy table, would hurt it as each plugin only access the specific parts of the table.
@Underbalanced
@Underbalanced
The only thing holding me back from asking for a pull request is that this sounds very specific to your needs. The fact is that it doesn't sound like your custom fork broadly supports other economy systems easily. And I can't actually see how you've comparatively changed the code (at least not in a non-time consuming way)... so I can only gather from your description that its meant for MySQL and iConomy only.
EDIT: So it supports servers that implement their economy plugin to use SQL tables, but what of those that use pure flat file storage? What about expanding to other economy-like plugins that do not utilize SQL tables at all?
Now I'm sorry that I haven't been able to get around to updating it as quickly as usual. I have been rather busy updating & revamping my own plugins, creating new plugins by request of servers that I work with (including a custom craftbukkit), and doing support for communities that I'm a part of. Not to mention, busy with real life stuff (e.g. getting a job offer, filing out paper work, figuring out moving plan of action)
Also, while having CashFlow retain its own user list may have been redundant in the past, it had been planned to utilize it for many new, (and frequently) requested features:
And having that table allows for easy future expansion for more per-player information retention. Yes, it may not have been fully implemented, but there was a point to it being there later on, and it had its use as a temporary solution for being added in earlier than what appeared to be necessary.
The Jar is available for those who want to use my Iconomy Version of cash flow for MySql Just get with me unless the developers of this plugin post it for me.
Changes Made: Removed Cashflow Listner - Listens for players to log on and insert them into table -This isnt needed since we do not need to create a player list Prefixes Code changed from cf_ to "" -We want no prefixes Changes all code that made the "cashflow" table in MySql to make it use iconomy table
Tested and works, when tax or salaries are paid, cashflow uses the iconomy table of players this should be more efficient since you no longer create two player list and use the listener.
Settings must be as such in MYSQL section tablePrefix: '' < Nothing Here
thank you for sharing source, i was successful on changing the code to just strait use the iconomy table, to reduce tables and redundancy. You should build this feature in so that anyone can use a existing economy player table in MySql.
I also stripped the listener, don't need it, since iconomy keeps the tables populated and purged automatically.
You can make it so we can have table name and play row name as variables like: table: iconomy playername colum: Username
@scott2184
When I meant stack trace, I meant the error message that occurs in the console that has information that allows me to know relatively at what point in the code that the error occurred. Without that, it could make finding the issue much harder than it need be.
So yes, do upload that latest version and try again.
As for auto-updaters, I have looked into it before, but I've decided against it. Sure, its convenient in a way, but it could also cause more problems if a broken update is released.
@Mitsugaru
Lost me at stacktrace, tbh (I'm not as up to date with the lingo like I used to be).
By the looks of it, it is the old 1.0 release of the plugin. I'll have to get in contact with and/or upload the newest version to my server host (Multiplay.co.uk). Latest version would be "v1.19 for CB 1.2.5-R1.2" I would assume?
Is there any way that this plugin can be configured so it auto-updates each time a new version is released?
@scott2184
That could be anything. Please provide the stacktrace from the console.
Also, please make sure you are actually using the latest beta version, and not the old release version 1.0.0 which is not supported.
Hi, I'm having trouble with this plugin. When I try and run any of the commands associated with CashFlow, I get the "An internal error occurred while attempting to perform this command" error show up.
I've added the cashflow.* permission node to the admin and moderator groups as well as the cashflow.tax, cashflow.basic and cashflow.salary permission nodes to the main member group.
I've tried running the commands without the nodes attached to the member group as well.
Any idea on how to fix?
@Jdon278
Tiered taxes has been requested... just not implemented. Perhaps in a future release.
Hi is there any way you can add a progressive tax system to this i.e the more a person the has the greater percent of their income is taken. This is the real life tax system and wish my server and this plugin to be as realistic as possible
@badda2k
That is probably the case... I'll think of a way to account for that.
@andrewkm
Source is on GitHub: https://github.com/mveritym/CashFlow
While this project isn't currently set up for continuous integration.. it could be as I do have a home-based Jenkins server. Although, I'd have to take the time to construct the tests for it though. Would there be enough interest for this?
Would you happen to have the source for this / as well as a jenkins where we can follow along with development builds?
@Mitsugaru
Good luck on your other plugins and thanks for keeping this updated! Just wondering though, what makes factions different? O_o In BOSE, they are called faction-
. It's also classified as a player. When I tried adding, for example, faction-22, it didn't tax them. Does it have to do with the fact faction-22 never logged on?
@badda2k
Sorry for the late reply. I'm honestly not sure as I've prioritized another of my plugin that requires an overhaul as well.
Hopefully, within the month, if I'm given time to work on both projects.
If its any consolation, I have already done some work on CashFlow in preparation to do the overhaul.
@Mitsugaru
Ok, thanks :) Not rushing you or set anything in stone, but when do you think 2.0 will be released (days, weeks, months)?
<<reply 694491="">>
Faction support may come after the 2.0 revamp... but its not planned for the next release.
Can you make it tax Factions, as well?
@MRCartm0n
Err... haven't really planned on it... Maybe afterwards.
@Swam_Ruan
Yes, it should be pulling groups and checking validity through Vault.
What permissions system are you running? Are there any errors in the console?
When trying to add a group to the salary it won't work, those groups are from the permission plugin, right? If not, what groups are these? Not working even when trying to add players...