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.
@Mitsugaru
i just tried it for moderator and administrator groups, it didnt work for them either.
Edit: I switched back to sqlLite and even after doing the addplayers command its not populating the db....thats likely the problem i think
Edit 2: i ran the addplayers command from the console and it generateda lot of problems, they all say the same thing so i'll just paste it once.
17:19:51 [WARNING] [CashFlow][SQLite] Error at SQL Query: [SQLITE_ERROR] SQL error or missing database (table cf_cashflow has 3 columns but 1 values were supplied)
@dropkickdragout
Is it working for non-default groups? Or is it not working for any groups?
I'm having a strange issue, the salary event is firing, but nobody is getting paid, its supposed to go to the group "default". im using 1.184 and bpermissions. it seems like maybe its not reading the groups so it doesnt know who to pay? just a guess.
@flungo
I've submitted version 1.184 which adds the functionality to not enable taxes/salaries on enable. CashFlow itself will still enable, so you can manually fire a tax/salary and the buffer should run through it.
If its not available through BukkitDev when you check, you may also download it frrom GitHub: https://github.com/mveritym/CashFlow/downloads
Let me know if this works out for you or not.
As a side note for you scheduling it yourself, just make sure to put the CatchUp sequence to something rather high so that it doesn't occur for you since you're doing it manually.
@flungo
No, I hadn't heard back so I hadn't included it. :/
@Mitsugaru
Is that included in this latest update you have done? Downloading now so will have a poke around the config to see if anything like that is there! For me that would work better!
Would it be possible to set this up for a specific time rather than a repeating time? Then you could make it at multiple specific times rather than the schedule. This would help server owners that restart their server daily or multiple times a day. I will submit a ticket if you prefer.
@flungo
If you want, I could put an option in the config to not enable a tax/salary on plugin enable? Then you could still fire the tax/salary via the appropriate command.
And I haven't tried with an interval of 0 for taxes/salaries...
What it would do (I think) is make a repeating thread... of 0 delay... which may be bad... IDK. So, I can't suggest that.
Either the taxing isn't working or the time persistence isn't working for me. I have a tax set up for every 24 hours but it never runs unless I manually fire it.
Here is a snippet of my config.yml:
To be honest, is there a way of disabling the auto-firing, if there is I would much rather schedule the command on my console. Does setting taxInterval: to 0 for example stop it?
@pocketkings719
Time persistence was added back with the 1.1 beta.
Can you confirm whether or not the schedule persists server restarts or does the schedule restart upon each restart?
@lambik
Uh... first, can you make a ticket? Second, can you provide more information as to what you did and what occurred as a result?
Help help help I accidentally accessed wrong command twice and now it is giving us the salary two times in a row, how can I fix that? Thanks
@Wppvater
Make a ticket with your config.yml. I'll look at it in a few hours.
After working just fine for over a week, CashFlow just stopped :( Every time i start up my server it gives me this error:
2012-02-27 06:15:46 [INFO] [CashFlow] Loading CashFlow v1.181. 2012-02-27 06:15:47 [INFO] [CashFlow] v1.181 has been enabled. 2012-02-27 06:15:47 [SEVERE] Error occurred while enabling CashFlow v1.181 (Is it up to date?): java.lang.Integer cannot be cast to java.lang.Double java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double at mveritym.cashflow.Config.getDouble(Config.java:198) at mveritym.cashflow.TaxManager.enableTax(TaxManager.java:361) at mveritym.cashflow.TaxManager.enable(TaxManager.java:343) at mveritym.cashflow.CashFlow.onEnable(CashFlow.java:75) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:230) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1057) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:380) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:199) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:182) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:357) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:344) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
And every time i use any command it returns this error:
2012-02-27 07:07:29 [WARNING] Unexpected exception while parsing console command org.bukkit.command.CommandException: Unhandled exception executing command 'cashflow' in plugin CashFlow v1.181 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:402) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:398) at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:574) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465) Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double at mveritym.cashflow.Config.getDouble(Config.java:198) at mveritym.cashflow.TaxManager.enableTax(TaxManager.java:361) at mveritym.cashflow.TaxManager.enable(TaxManager.java:343) at mveritym.cashflow.CashFlowCommand.onCommand(CashFlowCommand.java:63) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 7 more
@Wppvater
Yes, that could be implemented in a future release.
@Fronix
I do not do support on the old release version 1.0.0. Please grab the latest beta and see if that works out for you. Register is not needed for the betas, only Vault and an appropriate permission system.
bPermissions is a known issue as we have not updated to their new API just yet.
We are using both register and vault with iconomy and we get this when trying to boot the server.
First of all, thanks for a great plugin :)
Secondly, I have a question, is it possible to add salaries that pay out % of your total wealth instead of just a flat rate? If not, is it possible to add that in an update?
@capitano33
Sorry, what problem? o.O
Thank-you Mitsugaru. Your reply was not late at all in fact it was very quick (only 4 hrs from when I posted!). I will download 1.181 now.