Inactive [ADMN/ECON] PayDay v0.3.1 - User payouts by group (iConomy) - automated - synchronization[1000]

Discussion in 'Inactive/Unsupported Plugins' started by TZer0, Apr 10, 2011.

  1. Offline

    TZer0

    Check this plugin instead: http://dev.bukkit.org/server-mods/payday/

    Support for this plugin has been discontinued. If you wish to take over, please contact me.
    "It is pay day."
    -Dungeon Keeper 2

    Note: I'm going to rewrite/refactor my plugin once I get better (having a rather interesting fewer right now). This may take some time, but it will be worth it. Once this is done, the plugin will be released on bukkitdev.

    Note 2: I think that I will make a system that uses permission-nodes instead.


    Version: 0.2.10
    Downloads:

    Jar (Github),
    Jar (Dropbox),
    Source (GitHub)

    old (iConomy 4): jar(Github)
    old (iConomy 4): jar(Dropbox)

    Features:
    • Automated paydays!
    • Allows you to administrate your users' income. (allows negative income!)
    • Separate groups for players - easily imported from Permissions. Use worldconf to choose worldname.
    • Lots of, lots of aliases!
    Dependencies:
    Permission-nodes:
    Commands (all start with /pd for in-game help - say /pd):

    Remember: if a parameter contains spaces, surround it with quotes, that is: this chracter: "
    Show Spoiler

    • For non-admins: /pd shows the time to the next payday.
    • time - for admins: shows the time to the next payday.
    • checkerrors - checks for errors in the config-file
    • players [#] - shows number # page in the list of players
    • groups [#] - shows number # page in the list of groups
    • payday - pays everyone their money, won't run if checkerrors fails
    • payday [#] - same as above, but does it # times. (can be run for -1 times etc.)
    • set group name value - creates a group with earns value per payday
    • set player name groupname - assigns a player to a group
    • mv groupname1 groupname2 - moves all players from one group to another
    • delete player/group name - deletes a group/player
    • searchdelete player/group name - wildcard delete (may delete multiple entries, this is a powertool and should be treated as such)
    • sync [overwrite] - imports players and groups from iConomy and Permissions, if overwrite is given, players lose their current group and get a new group from Permissions. Group-names are also added with an income of 0 if not present.
    • recurring - see how to set up recurring payments
    • onlinemode [f/t] - only online players get paid.
    • lastperiodmode [f/t] - only players who have been online in the last period get paid, overrides onlinemode.
    • interest [value] - sets or displays interest (it is in percent, the amount paid will be (value/100)*money_in_account at each automated payday). Interest is paid out to ALL accounts, not only those registered in PayDay.
    • worldconf [worldname] - sets or displays what permissions-configuration is to be used in PayDay.
    • message [message] - sets or displays payday-message.
    • Aliases:
      • player = pl,
      • players = pl
      • groups = gr
      • group = gr
      • checkerrors = ce
      • payday = pd
      • set = s
      • delete = d
      • move = mv
      • sync = sy
      • overwrite = ow
      • sd = searchdelete
      • recurring = rec
      • onlinemode = om
      • time = t
      • lastperiodmode = lpm
      • interest = i
      • message = msg
      • worldconf = wc (oh wow! :p)
    Player names are CASE SENSITIVE, group names are CASE INSENSITIVE and for simplicity - I recommend using /pd sy or /pd sync



    How to set up recurring payments
    Show Spoiler

    Note: this is a bit untested but should work, please report any bugs ASAP
    The command is /pd rec mode arg
    There are 3 modes:

    deactivated
    Alias: d = deactivated

    Deactivates recurring payments
    usage: /pd rec d

    relative
    Alias: r = relative
    Sets recurring paydays relative to the current time. For instance: /pd rec r 10:1:3 will set paydays every 10 min, 1 hour and 3 days (or 263400 secs).
    /pd rec r 1 will set a payday every minute
    usage: /pd rec r minute:hours:days

    static, usage: /pd rec static (hour,day,week,month)
    aliases: h = hour, d = day, w = week, m = month, s = static
    Static will always happen on the first minute of the hour, month,
    day or week, depending on what you choose.
    Example: "/pd rec s d" sets the recurring payments to happen every day.

    Q&A
    Ohnoes, I've broken my settings without knowing it and then set up a recurring payday, what should I do?
    Don't worry: the system will tell the console and anyone who has the "payday.admin"-permission that something has gone wrong and prompt them to run /pd ce to fix things.


    Tricks:
    • /pd s gr epicgroup 10000 = /pd set group epicgroup 10000
    • /pd s pl TZer0 epicgroup = /pd set player TZer0 epicgroup
    • /pd pd = /pd payday
    • /pd d gr epicgroup = /pd delete group epicgroup
    Changelog:
    • v0.3.1
      • Bug fix related to changes in code due to adding Essentials-support.
    • v0.3
      • Added customizable messages.
      • Starting to add essentials-support (experimental version included, don't try this unless you're adventurous)
      • Fixed issues involving dots in names
    • v0.2.10
      • If an account holds negative amount of money after a PayDay, it is set to zero instead.
    Previous changes (open)

    • v0.2.9
      • Interest
      • Customizable world-name.
    • v0.2.8
      • Fixed upper and lower case-issues
      • Added handling of quotes
    • v0.2.7
      • Fixed /pd time for static modes.
    • v0.2.6
      • Let the admins know how long payday has been failing so that they can easily compensate the users' losses and how long ago the last successful payday was.
      • Payouts for people who have been online in the last period.
      • Commands which allow players and admins to see how long it is to the next payday (/pd for normal users, /pd t or /pd time for admins)
      • Undo and multi-payday
      • Removed player or group-payday.
    • v0.2.5
      • Removed a debug-message and a call to a deprecated function.
    • v0.2.4
      • Removed a debug-text.
    • v0.2.3
      • Onlinemode - enable to only pay people who are online.
    • v0.2.2
      • Re-enabled sync!
    • v0.2.1
      • iConomy 5, deactivated sync
    • v0.2
      • Recurring payments!
    • v0.1.6
      • Added negative payouts
    • v0.1.5
      • Fixed what v0.1.4 should've fixed.
    • v0.1.4
      • Fixed bug when running without Permissions.
    • v0.1.3
      • Foolishly discovered that I should've blacklisted "nation-" as well.
    • v0.1.2
      • Fixed /pd players 2+ giving an error, /pd ce now gives warnings when seeing accounts starting with "town-" (also blacklisted when importing), wildcard delete added.
    • v0.1.1
      • Fixed possible sync issue.
    • v0.1
      • Initial release.



    Q&A
    Show Spoiler

    Q: Do I get money while I'm offline?
    A: If online-mode is off (default), yes.

    Q: When is <feature> going to be implemented?
    A: I go for the "release it when it is done" way of doing things and I generally don't schedule things, if I say that I'll do it - it will be probably done within 24 hours, if I say it goes on the todo-list, expect some waiting-time. Currently, I'm rather busy so I only update the most important things or things which are really simple to add but add lots of value.


    Todo:
    • [medium] Player-owned companies where players pay other players for doing jobs etc. with easy administration + ranks.
    • [low/maybe] Might add BOSEconomy-support. BOSEconomy kind of has this including sync - but I might add this just for the sake of portability.
    • [low/maybe] Essentials Eco-support?
    Please leave feedback and any errors which should happen to pop up, but read Q&A before you ask a question.
     
    DoomLord likes this.
  2. Yeah, i had to change my main world name to ... world because of this :(
     
  3. Offline

    TZer0

    Sorry about that. I've added a worldconf-property. Set it accordingly if you've encountered any problems in moving your world.
    Done.
     
  4. Offline

    Mentalist

    Is there a command for players to join the group they choose instead of having a Moderator or Admin add them to the group? ex: /pd join epicsgroup
     
  5. Offline

    Endimmion

    Will there be a fix for negative account balance when using Payday with negative value?
     
  6. Offline

    TZer0

    No? Why should there be? I mean, that would let players themselves choose how much they earn!
    Ah, I thought iConomy might have a fix for that and I didn't really test that special case. Expect a fix within a few hours.

    Fixed.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  7. Offline

    Endimmion

    excellent, thank you :)

    How does interest work? If I set it to "-3", so each player's account on the server will get -3% removed?

    And if it works like that, in the future, can the value be put in a defined account?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  8. Offline

    TZer0

    -3% removed would imply that they get 3% :p. If you meant that 3% of the current value is removed, then yes.
     
  9. Offline

    fneyret

    Excellent :)
     
  10. Offline

    wiigor

    I found some issue I cannot really underststand:

    CONSOLE: ?cThe last 23 payday(s) failed, see /pd ce for more information
    Server: /pd ce
    CONSOLE: Checking for errors.
    CONSOLE: Cpt doesn't have an account!
    CONSOLE: Cpt belongs to an invalid group - { Omega=builder}
    CONSOLE: Errors found, fix them before running payday
    Server: /pd delete player cpt
    Server: /pd ce
    CONSOLE: Checking for errors.
    CONSOLE: No errors found.
    Server: /pd sync
    Server: /pd ce
    CONSOLE: Checking for errors.
    CONSOLE: Cpt doesn't have an account!
    CONSOLE: Cpt belongs to an invalid group - { Omega=builder}
    CONSOLE: Errors found, fix them before running payday
    Server: /pd groups
    CONSOLE: Listing Groups, page 0 of 1
    CONSOLE: server-operator - 60
    CONSOLE: builder - 49
    CONSOLE: kilobuilder - 270
    CONSOLE: admin - 311
    CONSOLE: none - 0
    CONSOLE: Forcing save..
    CONSOLE: Save complete.

    I don't understand exactly what is the problem but it seems to be some sort of glitch / bug that gives a player a chance to write his name in a particular way to fool some part of the plugin into thinking the player belongs to any group the player wants. In this case the groupname is an illegal groupname but it could have been legal too i think.
     
  11. Offline

    BenFudge

    Is there any way to take money away from a group? Like set up a group for my apartment building so it takes money from them daily? @TZer0
     
  12. Offline

    TZer0

    Can you post your config.yml from your PayDay-folder?
    Create a group with a negative income and set those players to be in that group.
     
    BenFudge likes this.
  13. Offline

    wiigor

    I have included the config.yml and saved it as .txt file cause else I could not upload it here.

    note that this player takes two lines in the players section:

    Cpt:
    ' Omega': builder

    The name of this player file in the players directory of minecraft itself is: " Cpt. Omega.dat"
     

    Attached Files:

  14. Offline

    TZer0

    I suspected that. I will try to fix that.
     
  15. Offline

    wiigor

    thanks for your kind and fast reactions :)
     
  16. Offline

    Novodantis

    Hey there, this plugin looks perfect for what I need, but I'm using Essentials on my server. Any chance it will be compatible with that soon? Or is there an Essentials equivalent? I tried using Fayconomy to mimick iConomy but this gave the error that it couldn't find iConomy.
     
  17. Offline

    TZer0

    I might add essentials eco (since you asked for it). Had it on todo, but under very low priority.
     
  18. Offline

    Novodantis

    Thanks! That would be great. The Essentials Eco & the economy signs are already pretty entrenched on our server, plus iConomy seems a bit much for our needs. But having even a simple repeating payment for players (that's more regular than I am) would be marvellous!
     
  19. Offline

    silentneeb

    I'm having a problem with the sync command. When ingame it just says "An internal error ocurred....", nothing comes up in the console, and nothing is said when I try using the command from the console. I tried changing world name to "world", worldconf, copied all the permissions to the world folder, but still no dice. I'm running Iconomy 5.1 (or .01 can't remember the format), and groupmanager with groupbridge. Manually setting up players and groups still work, but don't really want to do all that manual work (I'm effecient not lazy:cool:).
     
  20. Offline

    TZer0

    You need permissions 3.x+, gorupbridge won't help ;)
     
  21. Offline

    silentneeb

    Anyway to trick, cause last and only time I tried to use Permissions things got ugly, and never had any urge to try it again.
     
  22. Offline

    darkhelmet

    Gave it try on the latest versions but when I sync with permissions, every user is shown as "default" group.
     
  23. Offline

    Objit

    Does this work with groupmanager and the bridge.
     
  24. Offline

    Casier

    I don't think so because when i try to sync Payday whith my Groumanager Group, he has an error on the log :

    Log (open)
    2011-08-03 02:57:32 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'pd' in plugin PayDay v0.2.10
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.getPrimaryGroup(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    at tzer0.PayDay.PayDay.onCommand(PayDay.java:185)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
     
  25. Offline

    Objit

    Can you make this work with group manager as in make the sync feature work.
     
  26. Offline

    darkhelmet

    So we're trying to use this with the latest builds of everything. The issue I see is that when I run pd sync, many of our users don't have the right groups set. I don't know why that is. Many of the users who signed up recently and were promoted via the Permissions tracks feature seem fine, but people from before always show as default.

    Also, I can't seem to find this but it's likely right in front of my nose somewhere - is the recurring for in-game time? I'd like to be real-time because we often skip night.
     
  27. Offline

    loremipsumdolor

    Would it be possible for PayDay to use the Register API to support other major economy plugins?
     
  28. Offline

    Guarana_SUI

    awesome plugin!

    Can u implement a Tax mode? so when u use the negative income feature and a Player could not pay the "tax" so u get a warning message as soon as you(admin) go online?
    for example:
    its payday! yipee!: player A have 400coins he get payed with -500 :p
    so he have 0 or -100 coins after the payment. as soon this happens admin gets a message.

    Second Idea:
    User to user Payments!
    Example:
    I (user) have a lot of money and would like to pay another User evry week. so i (the user) can set up a own private payment with commands to pay another user.

    I hope u undersand my bad english

    greetings from swizerland :p
     
  29. Offline

    dadaking

    Hello it is possible to change the message "It is pay day" ??
    Thanks for the answer ;)
     
  30. Offline

    Alexion

    Same request :(
     
  31. Offline

    Shooty

    Same request :)
     

Share This Page