Time, UUIDs and randomness
The small Java tools behind cooldowns, player IDs and loot chances.
This page is still being written.
What it will cover
- System.currentTimeMillis and nanoTime; Duration and Instant; formatting remaining time
- UUID: what it is, why player data uses UUIDs not names (name changes), UUID.fromString, toString
- Random numbers: ThreadLocalRandom, weighted random loot table
- Math helpers for chances and percentages
- Runnable examples: cooldown checker, weighted loot table, time formatter
- Paper connection: player.getUniqueId(), cooldown maps keyed by UUID (link cooldowns-timers)