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

Command Addon API for /town buy #7177

Merged

Conversation

lexiccn
Copy link
Contributor

@lexiccn lexiccn commented Jan 8, 2024

Description:

Adds Command Addon API use for /town buy, allowing developers to integrate commands here, for example /town buy tiers

Additionally modifies the behaviour of /town buy (bonus):

  • The previous behaviour of /town buy with no argument, or a non-existent argument now applies to /town buy bonus without an argument, with a slightly reduced display (removes the title and command help)
  • The previous behaviour of /town buy bonus with no argument is removed, previously this would give an error to provide an amount/integer
  • Added a new /town buy help menu with a translatable help message, key town_buy_help in en-US.yml

New Nodes/Commands/ConfigOptions:

  • Permission: towny.command.town.buy.* - Wildcard permission for /town buy command
  • Permission: towny.command.town.buy.bonus - Effectively replaces towny.command.town.buy permission, child node of towny.command.town.buy.*

Relevant Towny Issue ticket:

#6379


  • 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.

Similar to how we handled the list permission changing.
@LlmDl LlmDl merged commit 7510c70 into TownyAdvanced:master Jan 9, 2024
3 checks passed
LlmDl added a commit that referenced this pull request Jan 9, 2024
PR #7177. (First-Time Contributor!)
    - It is now possible for other plugins to add subcommands to the
/town buy command.
    - Closes #6379.
  - New Permission Node: towny.command.town.buy.*
    - Child Nodes:
      - towny.command.town.buy.bonus - Allows mayors to use /t buy
bonus.
      - No change required in your townyperms.yml,
        the old node towny.command.town.buy will continue to point to
towny.command.town.buy.bonus,
        although it is recommended you change over to using the new
towny.command.town.buy.* instead.
@LlmDl LlmDl added this to the 0.100.1.0 milestone Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants