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

Modernize economy backend to conform to Vault's OfflinePlayer calls. #4702

Closed
wants to merge 1 commit into from

Conversation

LlmDl
Copy link
Member

@LlmDl LlmDl commented Jan 18, 2021

Description:

So as fun as this was (it wasn't) the end result is this:

  • Essentials Economy will not accept a call for an OfflinePlayer who has never logged in (all town, nation banks, the server-account and war-chest account.) Other economy plugins may react the same.
    • Either esseco support would be completely revoked or,
    • We don't actually use the OfflinePlayer with the given UUID for the town/nation and we just use accountName (not really modernizing anything as a result,) the same way FactionsUUID and other plugins handle this.)
  • Because we're using OfflinePlayers:
    • We either see lag whenever an account is accessed after each restart or,
    • We set the OfflinePlayer on loading each Town and Nation which results in a massive slowdown during the startup.
      • 2 towns and 1 nation went from loading in 29ms to 400+ms.
  • Leaving us with option # 3: drop support for Vault entirely and just use Reserve (not exactly tenable either.)

I'm going to leave this open here in case I do end up working something out.


New Nodes/Commands/ConfigOptions:


Relevant Towny Issue ticket:


  • 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 self-assigned this Jan 18, 2021
@LlmDl LlmDl added the Stalled PR A PR which has been put on Pause but may not be ready to be closed. label Mar 9, 2021
@LlmDl LlmDl force-pushed the feature/uuid_eco_support branch from 2badb33 to 17dde84 Compare November 1, 2021 17:36
Replace Government economy calls to use OfflinePlayer
Replace Player Account calls to use UUID
Make ReserveAdapter use UUIDs
Make VaultAdapter use OfflinePlayer
Converts town & nation accounts

TODO: convert server_account and war_spoils
TODO: major cleanup and removal of redundancies
economy overhaul second commit

First round of cleanup of everything.
Javadoc comments.
Add warchest and serveraccount to conversion.
economy overhaul third commit

Town/Nations BankAccounts work.
Towny-Server & WarChest accounts convert and work.
Resident accounts do not work.
economy overhaul fourth commit

this was a terrible idea
economy overhaul fifth commit

All account types convert.
Testing required but it appears to work.
Whitespacing cleanup commit.
Change from using deprecated method.
Revert change in last commit.
@Warriorrrr
Copy link
Member

Superseded by #7425

@Warriorrrr Warriorrrr closed this May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Label-Command Label-Data Label-Events Label-Money Label-Resident Stalled PR A PR which has been put on Pause but may not be ready to be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants