New leaderboard feature (/qt top) that allows players to view the top tax payers! Note that this feature requires the new option storage-type (which replaces track-stats) to be set in config.yml.
The leaderboard feature also comes with signs + heads that allows admins to designate a physical leaderboard area. Click on the spoiler below to see how to add yours today! If you are updating from a previous version, there are new lines you need to add to the language file so do read the notes at the end of this post^^
Place a wall sign and type the following:
1st line of sign: [quicktax]
2nd line of sign: <rank>
Note that the <rank> above refers to the leaderboard rank that you wish to set the sign for. So for example, here is what you will type exactly for a leaderboard rank 1 sign:
1st line of sign: [quicktax]
2nd line of sign: 1
The 3rd and 4th line will be automatically updated with the player at that particular position.
Player heads are optional and should you wish to include them, you may place any player headone block directly above the sign or one block above the block on which the wall sign is being placed on.
The leaderboard signs and heads will then automatically update themselves on every leaderboard update whose interval can be configured inside the config.yml file.
Alternatively, leaderboard updates can also be set to run after a scheduled tax collection via the new update-leaderboard-on-run option.
Notes:
Changes have been made to config.yml, schedule.yml and language files. It is recommended to regenerate them due to the plentiful updates but you may also read on the changes below and manually update those files if you wish. You may also refer to the newly updated default files on the main page if you need examples.
4 new permission nodes have been added:
quicktax.sign.add (adding a leaderboard sign)
quicktax.sign.remove (removing a leaderboard sign)
quicktax.top (for viewing the leaderboard)
quicktax.update (for manually updating the leaderboard)
3 new options have been added in config.yml:
update-interval (the interval between leaderboard updates)
update-on-start (true/false to indicate whether a leaderboard update should run on server start)
storage-type (to indicate the type of storage used)
Note that track-stats has now been replaced with storage-type to facilitate the eventual support for MySQL.
1 new option has been added into schedule.yml:
update-leaderboard-on-run (true/false to indicate whether a leaderboard update should run after a scheduled collection)
2 new PAPI placeholders:
%qtax_top_name_{rank}% (retrieve the name of the player at a particular leaderboard rank)
%qtax_top_tax_{rank}% (retrieve the total tax paid by the player at a particular leaderboard rank)
Again, due to the significant amount of changes above, it is recommended to regenerate your language file for the new messages to be applied. However, should you insist, you may also manually update your language file by copy and pasting the following lines:
Code (Text):
storage-disabled: '&cA valid storage type must be set in config for this feature to work!'
# leaderboard messages
update-started: '&aStarted tax payer leaderboard update.'
update-in-progress: '&cUpdate is currently in progress, please try again later.'
update-complete: '&aThe leaderboard update is complete!'
no-updated-leaderboard: '&cThere is no updated leaderboard!'
quicktax-sign-placed: '&aLeaderboard sign for rank %rank% has been placed!' #%rank%
quicktax-sign-broken: '&aLeaderboard sign for rank %rank% has been broken!' #%rank%
no-quicktax-sign-add-permission: '&cYou do not have permission to create a leaderboard sign!'
no-quicktax-sign-remove-permission: '&cYou do not have permission to break a leaderboard sign!'
# format for leaderboard sign message (line 1 and 2 are fixed, only line 3 and 4 are customizable)
# supports the following placeholders:
# %player%
# %totaltaxpaid%
leaderboard-sign: |
&a&l%player%
&c&l%totaltaxpaid%
# format for leaderboard
leaderboard-header: |
&b----- &6Tax Payer Leaderboard &b-----
# %num% is rank position, %player% is player name and %totaltaxpaid% is player total tax paid
leaderboard-body: |
&a%num% &b%player%: &e%totaltaxpaid%
# %page% is the next page number
leaderboard-footer: |
&6Type &e/qt top %page% &6to view next page