Elementium Sign in
Contents

Saved data · Check

Has a saved value

Whether anything is saved under a key against the server, a player, an entity, an item, a block or the menu.

Basic plan m.state.has

In a flow

“When a player right-clicks an entity → If Has a saved value entity, owner → Answer: Already tamed.”

When a player right-clicks an entity → If Has a saved value entity, owner → Answer: Already tamed.

What it does

Whether anything is saved under a key against the server, a player, an entity, an item, a block or the menu. It's a check: put it in an If, and the flow goes one way when it's true and the other when it isn't. Find it under Saved data in the palette.

When to use it

Use it when the flow needs to: whether anything is saved under a key against the server, a player, an entity, an item, a block or the menu.

When not to

To pick between more than two outcomes, Switch or Random reads better than a chain of checks.

Typical wiring

Sockets: settings you can wire

Player Player

Whose: the player (for player, item and menu). Leave unwired for whoever started the flow.

What goes there: Type it in the side panel, or wire in a player. e.g. Alex

If it's empty: Optional. Left empty and unwired, the step runs without it.

Entity Entity

Which entity, for entity. Wire one in, like Entity from Spawn an entity.

What goes there: Type it in the side panel, or wire in an entity. e.g. Zombie

If it's empty: Optional. Left empty and unwired, the step runs without it.

Block Location

Which block, for block: wire a location in, or type world x y z.

What goes there: Type it in the side panel, or wire in a location. e.g. world 10.5 64 -3.2

If it's empty: Optional. Left empty and unwired, the step runs without it.

Often next

Related in Saved data

Wires and sockets · Data values · Plans