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.
Whats the int measured in? ms,min,hour... ?
Thanks! you are awesome. this plugin is exactly what i was looking for.
@indigomontoya
Yeah, basically what happens is every time a salary or tax pays, it sets a variable called "lastPaid" to the current time. So when you restart your server and you don't restart taxes, the amount of time in between now and lastPaid gets bigger and bigger. Then when you enable it again, it tries to pay every tax and salary that *would* have been paid in between last paid and when you enabled it... if that makes sense. This only becomes a bad problem when your intervals are very small and your server goes down for a while - in this case it will try to make more Timer threads than it can handle and it will crash. Which is bad.
tl;dr - I can add an automatic enable option to 0.5 so every time the plugin is enabled it automatically enables taxes and salaries.
Ok thanks! Also, I have my server scheduled to restart every 5 hours. It seems like every time i do that I need to re-enable cashflow like it doesnt enable itself when a server starts up. Is there any way to fix this? Then when I do /cashflow enable it streams a ton of salary messages and pays a ton of money out.
@indigomontoya
You need to remake your salaries - they were being set as Doubles and the error you're getting is it's trying to parse a Double as a Double which is just stupid. If you remake them, they'll get saved as strings. Sorry. :S I'm separating the tax and salary online only option in 0.5 btw. And I don't know how to turn off notifications, maybe check your profile settings?
acctualllly it worked for a few minutes now I get this error when it tries to pay
exception in thread timer-16 java.lang.nullpointerexception at sun.misc.floatingdecimal.readjavaformatstring<Unknown Source> at java.lang.double.parseDouble<Unkown Source> at mveritym.cashflow.salarymanager.paysalary<salarymanager.java:322> at mveritym.cashflow.taxer$salarytask.run<tasker.java:70> at java.until.timerthread.mainloop<unknown source> at java.util.timerthread.run<unknown source>
great thanks! so two thoughts, can I have tax only happen if they are offline and salary only when they are online?? And is there a way to turn off the notification?
@indigomontoya
Try updating to 0.4.2 and let me know if you're still getting this error.
@indigomontoya Hm ok. I have a couple of bugs to fix tonight. Maybe update your craftbukkit and sit tight for an update and hopefully this will sort itself out. Most of the bugs I have to fix are command related so this might sort out yours. If not, back to the drawing board.
I am using 0.4.1 with iconomy 6, no messages at all from the console. It says it loaded the plugin. I don't even get a "unknown command" from the console, it just doesn't respond
@indigomontoya What version of CashFlow are you using? Do you happen to be getting a "Bukkit is sad" type error? Pretty much any more info you can give me about the problem is helpful, also if you could make a ticket that would be awesome. :)
hmmm plugin wouldn't be load because in console seen
Payment method not found, Disabling plugin.
what does it mean?
By GMLXK
when I try to use the commands they seem to have no response. Nothing even shows up in console? I am an admin on my server and have all permissions.
Cool can't wait till its compatible with permissionsbukkit...would be great for making people pay for owning a town. :D