🔀 Condition Blocks
Make your aliases actually think. Check stuff, then decide what to do. No coding required.
New in v4.0 — Works in any alias target. No separate config needed.
How It Looks
if:condition(args) do this stuff else do this instead
The else part is optional. If the check fails and there's no else, the alias just quietly does nothing. No ugly errors.
What You Can Check
| Condition | What you type | Example |
|---|---|---|
| XP Level | xp(30) | if:xp(30) give @s diamond else say Get to level 30 first! |
| Health % | health(50) | if:health(50) say Looking good! else say You're hurt! |
| Permission | perm(node) | if:perm(cmdmaker.admin) say Hello boss |
| Has Item | hasitem(id) | if:hasitem(minecraft:diamond) say Rich! else say Broke! |
| Variable | var(name value) | if:var(team red) tp @s red_base |
| Cooldown Ready | cooldown(alias) | if:cooldown(home) say Wait up else home |
| Player Name | player(name) | if:player(Steve) say Hey Steve! |
| Dimension | dimension(id) | if:dimension(nether) say It's getting hot in here |
| Is Op | op() | if:op() say You've got the power |
Real Examples You'd Actually Use
// Reward high-level players
"diamond_reward": "if:xp(30) give @s minecraft:diamond 5 else say Need 30 levels for diamonds!"
// Different spawn point per dimension
"spawn": "if:dimension(nether) say Use /overworld first! else tp @s 0 100 0"
// Don't let injured players go berserk
"berserk": "if:health(60) effect give @s minecraft:strength 10 2 else say Too hurt for that!"
// VIPs get the fancy greeting
"vip_greet": "if:perm(cmdmaker.vip) say Welcome back, VIP! else say Hey there!"
The Fine Print
- No nesting. One
if:per alias. Keep it simple. - Variables work inside.
${player},%placeholders%— all of it resolves before the condition runs. - Safe fail. If the condition makes no sense, it just returns false. No crash, no mess.
- Item IDs can be shorthand like
diamond— we'll assumeminecraft:diamond.
💡 Combo move:
if:cooldown(heal) say Wait 30s else if:health(80) say Already healthy! else heal — cooldown gating AND health check in one alias.