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

Economy UUID support #7425

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Economy UUID support #7425

wants to merge 6 commits into from

Conversation

Warriorrrr
Copy link
Member

Description:

Refactors our economy code to pass both the town name & uuid to economy plugins for greater compatibility.

Using some reflection a proper OfflinePlayer is made for each bank account, a v2 uuid is used for non player accounts to indicate that fact to economy plugins (configurable).

To avoid breaking stuff on existing servers, the economy provider is put into "legacy" mode using a config migration when upgrading. This will make the plugin continue using the name based methods for vault/reserve. Server admins can use the new /ta eco convert modern command to migrate all balances to the modern provider (recommended to not have any players on the server to avoid transactions during the split second of converting being undone). After conversion, the server will use the "new" methods from then on out.
New servers will automatically use the name & uuid methods, but they can choose to disable the option if they want.

Economy plugins that use the worldName variable will also be a bit more happier with Towny, previously the world that the player is in when the account is created would keep getting passed to vault, and it would not update when switching dimensions. This is now fixed, and the player's world (or first world on the server when offline) is now passed to it.


New Nodes/Commands/ConfigOptions:

Adds a new economy subcommand for the townyadmin command

  • The /ta depositall and resetbanks subcommands have been moved to it.
  • Adds a new convert command that can convert all the existing economy accounts to another economy implementation.

Relevant Towny Issue ticket:

Supersedes #4702


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

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.

None yet

1 participant