SalaryManager icon

SalaryManager -----

Pay periodic salaries, manage by group or user




Some file save optimizations
  • Now saving files on another thread as to not disrupt the main thread
Fixed issue with max daily payments for large servers
  • The last update (0.5.4) introduced this issue
  • If the per day history file was split into two (because the file got too large) then only the data in the most recent file would be considered for daily max payments
----------, Apr 24, 2021

Now checking log file sizes during operation.
If they're too big, a new log file is opened up.

This should increase performance in cases where there's a lot of data being saved to the logs as well as where the server is not frequently restarted.

This applied to both the regular payment history as well as the per day payment history.
----------, Apr 9, 2021

Added possibility for negative salaries.
New config entry:
Code (Text):
allow-negative-salaries: false
Thanks to @TunahanYilmaz for the suggestion!
----------, Feb 28, 2021

No idea how I forgot that to begin with.

In any case, added now.

Thanks to @Franki5612 for pointing it out!
----------, Jan 27, 2021

  • Added TNE soft dependency to plugin.yml.
    • I had forgot to do it with the last update.
    • Last version should work fine most of the time
  • Now checking if soft dependencies are enabled before enabling hooks
    • Previous versions should work most of the time
    • Issues would only arise if the dependency fails to load properly
  • Added a PAPI placeholder
    • %salarymanager_nr_salaries_paid_today% - number of payments made to the player today
  • Some codebase improvements
    • Moved separate responsibilities to separate class
    • Some other minor tweaks
PS:
There should be no real changes in functionality. If you do find something that behaves differently, let me know.
----------, Jan 14, 2021

Added support for The New Economy (optional). You can now use its accounts (which do not necessarily belong to a player) as banks.

You can set a The New Economy account as the bank by using /salarybank TNE <account name>.


Also added an alias to the /salaryfrom command as [/icode]/salrybank[/icode].

Thanks to @gerber11 for the suggestion to add TNE support.
----------, Jan 13, 2021

Added PlaceholderAPI support.
The following PAPI placeholders are available:
Code (Text):
%salarymanager_salary% - salary amount - normal
%salarymanager_salary_formatted% - salary amount - formatted
%salarymanager_salary_reason% - salary reason
%salarymanager_salary_time% - time till next payment
%salarymanager_salary_offline% - offline salary amount
%salarymanager_salary_offline_formatted% - offline salary amount - formatted
%salarymanager_salary_offline_reason% - offline salary reason
Fixed issue where if a player was paid both their offline and online salaries (i.e when offline-salaries-paid-when-online: true is set), only one was saved in the log.
This affected all versions from 0.3.0 up to 0.3.3.

Fixed issue with NPE in latest version due to improper order of execution when dealing with daily limits.
This affected only version 0.3.3.

Thanks go out to @KhrysAK47 for the wonderful suggestion.

PS:
I'm always grateful for all kinds of feedback. May it be bug reports or feature requests.
----------, Jan 9, 2021

Added an (optional) maximal daily (that is the real life day) payments.
It is disabled by default (or by setting the value to a negative one).

The new config entry:
Code (YAML):
max-payments-per-day : -1
PS:
This functionality works only if daily logs are enabled.
This is because it requires the knowledge of payments during the day and these can (potentially) span multiple server restarts.
As such for this functionality to be enabled, you need the following config options:
Code (YAML):
log-payments : true # needed to do daily logs
do-daily-logs
: true                     # needed for daily information
max-payments-per-day
: 10       # set this to a non-negative value to use a limit
 
----------, Jan 9, 2021

It is now possible to ignore certain worlds for payments.
When a player is in one of those worlds while they should be paid, the payments are ignored and the player does not get paid.

The new (empty by default) list of ignored worlds in config:
Code (YAML):
ignored-worlds : [ ]
Thanks to @Maverick0581 for the suggestion!
----------, Jan 2, 2021

Added support for legacy versions such as 1.8.

There is no functional difference on any other version.
----------, Nov 27, 2020

Thanks to @PlatinumPhoenix for the suggestion.

New command:
/salarysumup <filename> [-p or -g] - sums up the history of a .yml history file (per day or otherwise). Shows the totals for both players and groups (default) or only players ( -p option) or only groups ( -g option).

New entry to config.yml:
Code (Java):
do -daily -logs : false
New entries to messages.yml:
Code (YAML):
salary :
  # old entries
  sumup-header
: "&6Total payments for {day} {options}"
  no-such-file
: "&cNo such history file found: &7{file}"
  group-daily-total
: "&6The group &7{group}&6 got a total of &8{amount}"
  player-daily-total
: "&6The player &7{player}&6 got a total of &8{amount}"
  nothing-to-show-daily
: "&cThere were no entries for the day"

Full change log:
  • Refactoring of code
    • Code quality is now slightly better (though still pretty poor)
  • Fixed issue with history file recording incorrect groups
    • Was an issue when get-all was set to true in the config
  • Added name of group to history
    • When received group salary, the group name is now logged in the history
  • Added per day logging
    • Currently only available in addition to regular history
    • Optional, disabled by default
    • Creates a separate file for each day
    • File names formatted per_day_history_<date>.yml
  • Added command tab-completion
  • Added the /salarysumup command
    • Can sum up history files
    • Lists per day history files in tab-completion
    • Also works for regular history files
      • Need to write the name manually
      • If you want to have these tab-completed as well, let me know
    • Shows the totals per day for each player and group
      • Options in command to only show player or group sums
    • Includes new messages
----------, Sep 17, 2020

If anyone has any issues, do let me know.
----------, Jul 2, 2020

Fixed an issue that caused a NullPointerException when doing
/salaryfrom none.
----------, May 3, 2020

Added config option to only pay offline salaries to players when they're offline.

New config entry:
Code (Text):
offline-salaries-paid-when-online: true # defaults to true
----------, Apr 30, 2020

When logging to file was disabled, the history.yml could get too large and saving further history to it would take too long and could cause hickups for the server.

Thus, now a backup of the history.yml file is created once it's bigger than 100kb. This should hold (roughly) 700 per-player logged payments.
The size check is only done on server startup.
----------, Apr 18, 2020

Providing alternative number format for those that experience an issue with the default locale.

New entry in the config (default):
Code (YAML):
simpler-money-format : false
Set to true to enable simpler money format.
----------, Mar 10, 2020

Added BStats.

There's a config entry to disable it if you do not wish to use it:
Code (YAML):
use-bstats : true # default is true
Internal changes:
Finally started using maven for this project as well. Should not see any difference in operation.
----------, Mar 7, 2020

Added two new config entries to allow disabling logging for the console as well as for staff.
New entries:
Code (YAML):
log-payments-to-console : true # default
notify-staff
: true # default
----------, Aug 13, 2019

Added possibility of setting an account from which to withdraw the amount. Added appropriate messages. Added config entry to deny finding of offline players by name (can hang the server)

Suggested by @Laynoooor

PS.
Right now, the players will get their money even if the "bank" account is out of money. Will add different settings for this later (i.e if not enough money a) nobody gets any money b) account goes negative c) people get money regardless of the bank's account balance d) people get a proportionately smaller sum).
----------, May 22, 2019

Added a config option to not reschedule the payment period on /salaryreload as suggested by @Laynoooor.

Thanks for the feedback!
----------, May 22, 2019

Fixing the issue brought up by @acatterz in here.

Thanks for the report!
----------, May 22, 2019

Added support for German thanks to @Iluster (and potentially other languages in the future).

Fixed a number of terrible coding practices.
----------, Mar 27, 2019

There is a new config entry:
Code (YAML):

get-player-salary-when-possible
: false # default
----------, Dec 1, 2018

The issue was to do with setting of new salaries (specifically group salaries).
----------, Nov 30, 2018

A (currently) online player can now be set to have an offline salary by adding -o at the end of the /salary command.
This requires the salarymanager.set.offline permission node.

Thanks to @vajenov for the suggestion.
----------, Nov 30, 2018

Setting new salaries would work but not save to file after migration to a separate salaries file ( salaries.yml), fixed now.

The plugin has always worked for 1.13, but now I made sure that it does and added the api-support line into plugin.yml.

Versions 0.0.6 and 0.0.7 are NOT TO BE USED:
----------, Nov 18, 2018

Making sure all added message entries go to messages.yml without user intervention
----------, Nov 18, 2018

Don't want to clutter the config so moved salaries to its own config file.

The entries in config.yml should be migrated to the new one automatically and deleted from config.yml, however, a copy of config.yml is also backed up beforehand in case something goes wrong.
----------, Nov 18, 2018

Now able to log payments to history.yml. This can be disabled in the config but is enabled by default.

Now able to change the time formats (i.e "h" for hour and "m" for minute) in messages.yml. *

Numbers are now formatted more user-friendly (no scientific notation).

* If you've already got a messages.yml, you can add the missing part:
Code (Text):
time:
  seconds: s
  minutes: m
  hours: h
  days: d
  months: mo
  years: y
 
or just remove/move the messages.yml to force the generation of a new one.
----------, Nov 16, 2018

Sending a message to players who got $0 was really a bug more than anything else.
----------, Nov 16, 2018

Version bump
----------, Nov 15, 2018

Added (optional) Essentials hook.
Added option to skip paying Salaries to AFK players (this requires Essentials).
There now an option in the config that can be toggled.
----------, Nov 15, 2018

Previously the reload command would not reload the messages. Now it does.
----------, Sep 12, 2018

Resource Information
Author:
----------
Total Downloads: 12,774
First Release: Sep 12, 2018
Last Update: Apr 24, 2021
Category: ---------------
All-Time Rating:
19 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings