Compatibility
Minecraft: Java Edition
Platforms
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
BlanketConditionalText
🔍 Overview:
- The BlanketConditionalText allows server owners to display dynamic, conditional messages based on player stats, time, and other customizable parameters. With placeholders defined in JSON files, you can control what players see on scoreboards, in the chat, in holograms, and beyond—all based on customizable rules! Perfect for keeping players informed, entertained, and aware of key stats and events!
📜 Features:
- Define placeholders with conditions that display specific messages based on in-game values.
- Supports multiple rules per placeholder for varied messages.
- Easy JSON configuration, with options for text color, permissions, and custom placeholders.
📂 How It Works: Placeholders are defined in JSON files located in the config/blanketct/placeholders folder. Each placeholder has:
- A placeholderid - a unique ID you use in-game.
- A source placeholder that pulls values (like %player:health% or %server:time H%).
- Custom rules with conditions and messages to show when conditions are met.
📋 Conditions Explained: Conditions are the core of how Blanket Conditional Text Mod displays context-sensitive messages. With conditions, you can decide what message to show based on the value of a placeholder (such as player health or server time).
Each condition has:
-
Operator: Specifies the type of comparison, such as:
<
(less than)>
(greater than)=
(equal to)!=
(not equal to)
-
Value: The threshold against which the placeholder value is compared.
The mod evaluates conditions in the order they’re defined in the JSON configuration. It starts at the top of the list, checks each condition, and stops at the first condition that matches. If no conditions match, a fallback message (the last rule without a condition) is displayed.
How Conditions Work Step-by-Step
- Retrieve Placeholder Value: The mod fetches the current value of the placeholder, such as a player’s health or the time of day.
- Evaluate Each Condition: Starting from the top, it compares the placeholder value to each rule’s condition.
- Display the First Matching Text: As soon as it finds a matching condition, it displays the corresponding text and stops further evaluation.
- Fallback Message: If none of the conditions match, the mod displays the text from a rule with
null
as the condition (if it exists).
Examples:
1️⃣ Health Status Placeholder
- Shows different messages based on the player’s health level.
{
"placeholderid": "health_status",
"placeholder": "%player:health%",
"rules": [
{ "condition": "<3", "text": "§cYou're about to die!" },
{ "condition": "<6", "text": "§eYou're still fiiine..." },
{ "condition": null, "text": "§aHealthy as ever!" }
]
}
- Usage: %blanketct:health_status% Display:
- You're about to die! (when health < 3)
- You're still fiiine... (when 3 ≤ health < 6)
- Healthy as ever! (when health ≥ 6)
2️⃣ Time of Day Placeholder
- Shows messages depending on the server time.
{
"placeholderid": "time_of_day",
"placeholder": "%server:time H%",
"rules": [
{ "condition": "<12", "text": "§6Good morning!" },
{ "condition": "<18", "text": "§eGood afternoon!" },
{ "condition": null, "text": "§9Good evening!" }
]
}
- Usage: %blanketct:time_of_day% Display:
- Good morning! (when time < 12)
- Good afternoon! (when 12 ≤ time < 18)
- Good evening! (when time ≥ 18)
Reload Command:
- Use /bct reload to reload configuration files without restarting the server (requires permission bct.reload).
⚙️ Customizable & Expandable: Simply add new JSON files in the configuration folder to expand your placeholders and rules.