PlaceholderAPI
Advanced placeholder API for Hytale servers that enables dynamic string substitution with support for player-specific data, caching, parameters, and scoped contexts.
About PlaceholderAPI
PlaceholderAPI
A flexible and powerful placeholder system for Hytale server developers. It allows for easy registration and retrieval of dynamic values in strings, with support for caching, player-specific data, parameters, and scoped contexts.
More detailed usage with examples can be found on github.
Features
Easy to use: Simple API for both Java and Kotlin developers.
Dynamic Values: Support for player-specific placeholders (Visitor-Sensitive).
Caching: Built-in support for caching and automatic updates.
Parameters: Support for complex placeholders with parameters like %player_name<lc>%.
Scopes: Scoped contexts (e.g., Chat, Message) to provide relevant data only where needed.
Kotlin First: Type-safe DSL and extension functions for Kotlin developers.
Getting Started
To use the API, you first need to get the PlaceholderAPI instance.
Java:
PlaceholderAPI api = PlaceholderAPI.getInstance(); Kotlin:
val api = PlaceholderAPI.getInstance()
Usage
Translating Strings
To replace all placeholders in a string automatically, use the translateString() method.
Java:
String result = api.translateString("Hello %player_display_name%!", player); Kotlin:
val result = "Hello %player_display_name%!".translatePlaceholders(player)
Registering Placeholders
Static Placeholders
Example of a placeholder that returns the current server tick:
Kotlin DSL:
api.build<Int>("tick") { loader { Server.getInstance().tick } } Visitor-Sensitive Placeholders
Example of a placeholder that returns the player's name:
Kotlin DSL:
api.build<String>("player_name") { visitorLoader { player.name } }
Advanced Features
Parameters
Placeholders can accept parameters using the %name<param1,param2>% syntax. Example: %player_name<lc>% returns the name in lowercase.
Scopes & Contexts
Scopes allow placeholders to be available only in specific situations (e.g., %message% only available in chat events).
Built-in Placeholders
Placeholder Description Scope
%player_display_name% Player's display name Global
%player_gamemode% Player's game mode Global
%player_x%, %player_y%, %player_z% Player coordinates Global
%server_online% Number of players online Global
%server_ram_used% Server RAM usage Global
%time% Current server time Global
%message% Chat/Message content Chat/Message
%message_sender% Sender of the message Chat/Message
Kotlin Support
PlaceholderAPI offers a Type-safe DSL for registering placeholders and convenient Extension functions for easy integration.
Categories
Need a Server?
Run PlaceholderAPI on a dedicated Hytale server with easy mod management.
Get Hytale HostingFrequently Asked Questions
What is PlaceholderAPI?
Advanced placeholder API for Hytale servers that enables dynamic string substitution with support for player-specific data, caching, parameters, and scoped contexts.
How do I download PlaceholderAPI?
You can download PlaceholderAPI for free from CurseForge. Click the "Download on CurseForge" button on this page to go directly to the download page.
Who created PlaceholderAPI?
PlaceholderAPI was created by CreeperFace. The mod has been downloaded 256 times.
Is PlaceholderAPI compatible with Hytale servers?
PlaceholderAPI is designed for Hytale and can be used on both single-player and multiplayer servers. Check the mod page on CurseForge for specific compatibility information.
How do I install PlaceholderAPI?
To install PlaceholderAPI: 1) Download the mod from CurseForge, 2) Place the file in your Hytale mods folder, 3) Restart the game. The mod should load automatically.
Related Qol Mods
View all modsEyeSpy
DarkhaxDev
Adds a HUD that displays information about what you're looking at!
Advanced Item Info
Buuz135
Adds a searchable GUI that displays all the items and the game and displays extra properties they have
Overstacked
DarkhaxDev
Increases the maximum stack size of items.
Violet's Wardrobe
VioletsWorkshop
Adds more customisation options in the form of craftable cosmetics
Item Magnet
Jaredlll08
Adds a magnet that attracts items towards the player.
Endgame & QoL - Boss & Elite Update (3.0.0 in a week)
Lewaii
Endgame & QoL v2.2: Face the Alpha T-Rex & Void Spectres! Unlock Backpack IV & Void Gliders. Restore unused content and challenge stronger, rebalanced bosses!
