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

New PlaceholderAPI placeholders #4160

Merged
merged 8 commits into from
Jul 15, 2020
Merged

New PlaceholderAPI placeholders #4160

merged 8 commits into from
Jul 15, 2020

Conversation

Yldales
Copy link
Contributor

@Yldales Yldales commented Jul 12, 2020

Hi,

Description:

Add a fews PAPI placeholders for general use, or more specifics uses cases (see below).


New Nodes/Commands/ConfigOptions:

PAPI Placeholders:

  • %townyadvanced_town_prefix%: Display the config-defined prefix of the player's town (ex: ruins, settlement, ...)
  • %townyadvanced_town_postfix%: Display the config-defined postfix of the player's nation (ex: ruins, settlement, ...)
  • %townyadvanced_nation_prefix%: Display the config-defined prefix of the player's town (ex: lands, realms, ...)
  • %townyadvanced_nation_postfix%: Display the config-defined postfix of the player's nation (ex: lands, realms, ...)
  • %townyadvanced_player_jailed%: Display true is the player is jailed, otherwise false.
  • %townyadvanced_player_plot_type%: Display the townblock's type at the resident's location (ex: shop), or "" if none.
  • %townyadvanced_player_plot_owner%: Display true if the resident is owning the townblock at his location.

Relevant Towny Issue ticket:

  • None

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

Use Cases

In conjunction with LuckPerms's contexts and ExtraContexts, thoses placeholders allow, for exemple, to:


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.

Yldales added 7 commits July 12, 2020 20:39
…_plot_owner%", hoping that the formatting didn't break.
…quest method, since the news placeholders will have to know the potential townblock in which the resident is located.
…townblock's type where the resident is standing. Else, display an empty string.
…e" if the resident is the owner of this townblock.
…nced_nation_prefix% and %townyadvanced_nation_postfix%.
@Yldales Yldales marked this pull request as ready for review July 13, 2020 08:47
@LlmDl LlmDl merged commit a9428a2 into TownyAdvanced:master Jul 15, 2020
LlmDl added a commit that referenced this pull request Jul 15, 2020
  - Confirmation System QOL Improvements/Changes, courtesy of Siris with
PR #4167.
  - Add hex support to lang files, courtesy of Siris with PR #4161.
  - Add resident to town claim event, courtesy of Siris with PR #4156.
  - Add namespacing for commands run by clickable text, courtesy of
Siris with PR #4147.
  - New PlaceholderAPI placeholders, courtesy of Yldales with PR #4160.
    - %townyadvanced_town_prefix%: Display the config-defined prefix of
the player's town (ex: ruins, settlement, ...)
    - %townyadvanced_town_postfix%: Display the config-defined postfix
of the player's nation (ex: ruins, settlement, ...)
    - %townyadvanced_nation_prefix%: Display the config-defined prefix
of the player's town (ex: lands, realms, ...)
    - %townyadvanced_nation_postfix%: Display the config-defined postfix
of the player's nation (ex: lands, realms, ...)
    - %townyadvanced_player_jailed%: Display true is the player is
jailed, otherwise false.
    - %townyadvanced_player_plot_type%: Display the townblock's type at
the resident's location (ex: shop), or "" if none.
    - %townyadvanced_player_plot_owner%: Display true if the resident is
owning the townblock at his location.
@LlmDl LlmDl added this to the 0.96.3.0 milestone Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants