Skip to content

符合 Bukkit 规范的离线玩家 Uuid 生成实现#169

Merged
laolarou726 merged 2 commits intoCorona-Studio:masterfrom
natsurainko:master
Mar 21, 2025
Merged

符合 Bukkit 规范的离线玩家 Uuid 生成实现#169
laolarou726 merged 2 commits intoCorona-Studio:masterfrom
natsurainko:master

Conversation

@natsurainko
Copy link
Copy Markdown
Contributor

@natsurainko natsurainko commented Mar 21, 2025

预期目标 What does the pull request do

  • 符合 Bukkit 规范的离线玩家 Uuid 生成实现

检查清单 Checklist

  • 预期的目标都已经实现
  • 已经在本地测试了所有更改

关联事件 Related

补充说明 Additional Information

无 N/A


PR-Codex overview

This PR enhances the GuidHelper class by adding a new method ToGuidHashAsName for generating a Guid from a player's username, ensuring it follows the Bukkit offline player UUID generation rules. It also introduces a new Uuid struct for Rfc4122 format handling.

Detailed summary

  • Added method ToGuidHashAsName for generating a Guid from a username.
  • Modified the hash calculation to ensure compliance with Bukkit UUID rules.
  • Introduced a new private struct Uuid for Rfc4122 formatted GUID handling.
  • Implemented methods for byte manipulation and formatting in Uuid.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@laolarou726 laolarou726 merged commit 07f9499 into Corona-Studio:master Mar 21, 2025
4 of 6 checks passed
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