Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added unformatted town/nation balance placeholders #6263

Conversation

PainOchoco
Copy link
Contributor

Description:

Adds placeholders for town's and nation's unformatted balance. They can be use to create leaderboards with another third-party plugin like ajLeaderboards.

New placeholders
  • %townyadvanced_town_balance_unformatted%
  • %townyadvanced_nation_balance_unformatted%

Relevant Towny Issue ticket:

#5073


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

@LlmDl LlmDl added the Label-Placeholders Tickets related to the PlaceholderAPI. label Oct 25, 2022
@LlmDl LlmDl added this to the 0.98.4.0 milestone Oct 28, 2022
@LlmDl LlmDl changed the title Added placeholders Added unformatted town/nation balance placeholders Oct 28, 2022
@LlmDl LlmDl merged commit 2ab8aed into TownyAdvanced:master Oct 28, 2022
@LlmDl LlmDl deleted the town_nation_balance_unformatted_placeholders branch October 28, 2022 14:23
LlmDl added a commit that referenced this pull request Oct 28, 2022
PainOchoco with PR #6263.
  - New Placeholders:
    - %townyadvanced_town_balance_unformatted% - Shows the town's raw
cached bank balance.
    - %townyadvanced_nation_balance_unformatted% - Shows the nation's
raw cached bank balance.
  - Added max residents per nation, courtesy of PainOchoco with
PR #6264.
  - New Config Option: global_nation_settings.max_residents_per_nation
    - Default: 0
    - If higher than 0, it will limit how many residents can join a
nation. Does not affect existing nations that are already over the
limit.
  - Added Nation tax percent, courtesy of PainOchoco with PR #6262.
    - It is possible for nations to use /n toggle taxpercent, and tax
their towns a percent of the town bank, instead of a flat rate.
    - This prevents towns being kicked for non-payment, as the amount
just shrinks as the town gets poorer.
  - New Config Options:
    - nation.default_taxes.tax
      - Default: 0.0
      - Default amount of tax of a new nation. This must be lower than
the economy.daily_taxes.max_nation_tax_amount setting.
    - nation.default_taxes.taxpercentage
      - Default: false
      - Default status of new nation's taxpercentage. True means that
the default_tax is treated as a percentage instead of a fixed amount.
    - nation.default_taxes.minimumtax
      - Default: 0.0
      - A required minimum tax amount for the default_tax, will not
change any nations which already have a tax set.
      - Do not forget to set the default_tax to more than 0 or new
nations will still begin with a tax of zero.
    - economy.daily_taxes.max_nation_tax_percent
      - Default: 25
      - Maximum tax percentage allowed when taxing by percentages for
nations.
    - economy.daily_taxes.max_nation_tax_percent_amount
      - Default: 10000
      - The maximum amount of money that can be taken from a balance
when using a percent tax, this is the default for all new nations.
  - New Commands:
    - `/nation toggle taxpercent` - Toggle percentage nationtax on or
off.
    - `/nation set taxpercentcap` - Sets the max amount of money which
can be gotten via percent nationtax, from a town.
  - New Permission Nodes:
    - `towny.command.nation.toggle.taxpercent` - Child node of
towny.command.nation.toggle.*.
    - ` towny.command.nation.set.taxpercentcap` - Child node of
towny.command.nation.set.*.
    - No changes to townyperms.yml required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Label-Placeholders Tickets related to the PlaceholderAPI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants