Skip to content

1.0.2 - OfflinePlayerCache & OfflinePlayer argument

Choose a tag to compare

@1robie 1robie released this 09 Jul 09:56
· 18 commits to main since this release

✨ New

  • OfflinePlayerCache: two-tier player name cache, with Mojang stale-name refresh, fluent Builder for customization,
    thread-safe global instance, cache stats, and clear/reset
  • OfflinePlayerArgument: Brigadier argument type resolving player names to
    UUID via the cache, with tab-completion.

📦 Usage

// Quick setup
OfflinePlayerCache.install(this);

// Or with custom settings
OfflinePlayerCache.builder(this)
        .maximumSize(5000)
    .expireAfterwrite(Duration.ofMinutes(10))
            .recordStats(true)
    .buildAndRegister();

// In commands
.addRequiredArgument("target", new OfflinePlayerArgument())