🗺️ WorldTimePlaceholders
The ultimate fix for displaying world time in your server MOTD and Server List.
Ever tried to show the current in-game time in your server's MOTD using standard PlaceholderAPI (PAPI) expansions, only to get broken text, errors, or blank spaces?
That happens because traditional expansions (like the Worlds extension) require an active, online Player object to pull data. When a prospective player is just looking at their server list, there is no Player object context yet.
WorldTimePlaceholders solves this completely. It safely reads and caches world times directly from the server thread, allowing you to use accurate, real-time world placeholders anywhere—even in player-less contexts like server-list pings and MOTDs.
✨ Features
- Player-Less Parsing: Works flawlessly in MOTDs and server-list ping contexts without requiring a real online player.
- Completely Safe: Unlike other expansions, it never dangerously casts an
OfflinePlayerto aPlayer, preventing console errors. - Performance Optimized: Minimizes impact by fetching world times on the server thread and caching the values once per second.
- Format Flexibility: Supports 12-hour, 24-hour, raw ticks, and total day counters.
- Smart World Matching: Case-insensitive world lookup and full support for world names containing underscores (e.g.,
world_nether).
🛠️ Requirements & Installation
- Server core: Paper (or forks)
- Dependency: PlaceholderAPI
- Ensure PlaceholderAPI is installed.
- Drop
WorldTimePlaceholders.jarinto your server'spluginsfolder. - Restart your server.
- Use the placeholders in any plugin that supports PAPI!
🧩 Placeholders & Examples
Replace <world> with the exact name of your world.
| Placeholder Type | Syntax | Real-World Example | Output Preview |
|---|---|---|---|
| 12-Hour Time | %WorldTimePlaceholders_12_<world>% |
%WorldTimePlaceholders_12_world% |
6:00 AM |
| 24-Hour Time | %WorldTimePlaceholders_24_<world>% |
%WorldTimePlaceholders_24_world_nether% |
18:30 |
| Raw Ticks | %WorldTimePlaceholders_ticks_<world>% |
%WorldTimePlaceholders_ticks_world% |
0 |
| Day Counter | %WorldTimePlaceholders_day_<world>% |
%WorldTimePlaceholders_day_world_the_end% |
42 |
Note: If an unknown world name is provided, the placeholder will safely return an empty value instead of breaking.
📝 Configuration / Use-Case Examples
AdvancedServerList & MOTD Integration
This plugin pairs perfectly with MOTD managers like AdvancedServerList, where placeholders are parsed during a ping event rather than a player event.
Example MOTD Configuration:
&aWelcome to our Server!
&7Current Overworld Time: &e%WorldTimePlaceholders_12_world% &8| &7Day: &b%WorldTimePlaceholders_day_world%