Skip to content

Add configurable offline UUID modes with prefix support - #325

Closed
AeiouJx wants to merge 1 commit into
rfresh2:1.21.4from
AeiouJx:feature/offline-uuid-modes
Closed

Add configurable offline UUID modes with prefix support#325
AeiouJx wants to merge 1 commit into
rfresh2:1.21.4from
AeiouJx:feature/offline-uuid-modes

Conversation

@AeiouJx

@AeiouJx AeiouJx commented Sep 1, 2026

Copy link
Copy Markdown

Summary

Adds configurable UUID generation modes for offline authentication.

Changes

  • New OfflineUUIDMode enum: RANDOM, FIXED, GENERATED
  • New config fields: offlineUUIDMode, offlineUUIDPrefix
  • unsupported auth offlineUUID gains new subcommands:
    • mode <random/fixed/generated>
    • prefix <prefix> (default: OfflinePlayer:)
    • set <uuid> (also switches to FIXED mode)
    • clear (reset to RANDOM mode)

Usage

unsupported auth offlineUUID mode generated unsupported auth offlineUUID prefix OfflinePlayer: unsupported auth offlineUUID mode fixed unsupported auth offlineUUID set 123e4567-e89b-12d3-a456-426614174000

Notes

  • Default mode is RANDOM (preserves existing behavior)
  • GENERATED uses UUID.nameUUIDFromBytes((prefix + username).getBytes(UTF_8))
  • FIXED falls back to random if no UUID configured

@rfresh2

rfresh2 commented Sep 1, 2026

Copy link
Copy Markdown
Owner

does not seem useful enough to be worth the complexity

but you can set Globals.CONFIG.auth.offlineUUID with whatever special logic you want from a plugin

@rfresh2 rfresh2 closed this Sep 1, 2026
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