release: v3.1.1 - cross-server payment fix#172
Merged
Conversation
- Bump all module versions from 3.1.0 to 3.1.1 - Add 3.1.1 changelog entry documenting cross-server payment fix - Update cross-server and storage-provider docs to reflect the fix
PayCommand now checks MessagingService and storage.resolvePlayerByName() when the recipient is not found locally, enabling payments to players on other backend servers. PaymentExecutor resolves the recipient UUID from the messaging service or shared database instead of using Bukkit.getOfflinePlayer(name), which generates an incorrect offline-mode UUID for players unknown to the local server. MySQLStorageProvider now implements resolvePlayerByName() by querying the players table, and persistPlayerInfo() for explicit player data upserts.
When knownOffline is set but no UUID can be resolved from the messaging service or storage, fall back to the Bukkit offline player instead of returning player_not_found. Fixes PayCommandOfflineSequentialFeatureTest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/payfailing silently when recipient has never joined the sender's serverPayCommandnow checksMessagingServiceandStorageProvider.resolvePlayerByName()for cross-server player resolutionPaymentExecutorresolves the correct UUID from the shared database, with proper fallback to Bukkit's offline player whenknownOfflineis setMySQLStorageProviderimplementsresolvePlayerByName()andpersistPlayerInfo()PayCommandOfflineSequentialFeatureTestregressionTest plan
/pay <player>works when recipient is on a different backend server/pay <player>works for local online and offline playersPayCommandOfflineSequentialFeatureTestpasses