Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameInvisible
Syntaxinvisible (<entity>|...) ({true}/false/toggle/reset) (for:<player>|...)
Short DescriptionSets whether an NPC or entity are invisible.
Full DescriptionSets whether the specified entities are invisible (equivalent to an invisibility potion), defaults to the linked player/NPC if none were specified.
If an NPC was specified, the 'invisible' trait is applied.

Optionally specify 'for:' with a list of players to fake the entities' visibility state for these players.
When using 'toggle' with the 'for:' argument, the visibility state will be toggled for each player separately.
If unspecified, will be set globally.
'for:' players remain tracked even when offline/reconnecting, but are forgotten after server restart.
Note that using the 'for:' argument won't apply the 'invisible' trait to NPCs.

When not using 'for:', the effect is global / on the real entity, which will persist in that entity's data until changed.

To reset an entity's fake visibility use the 'reset' state.
A reset is global by default, use the 'for:' argument to reset specific players.

NPCs can't be made invisible if not added to the playerlist (the invisible trait adds the NPC to the playerlist when set).
See Language:invisible trait
Related TagsNone
Usage Example
# Use to make the linked player (or NPC, if there isn't one) invisible.
- invisible
Usage Example
# Use to make the linked NPC visible if previously invisible, and invisible if not.
- invisible <npc> toggle
Usage Example
# Use to make an entity visible for specific players, without changing the way other players see it.
- invisible <[entity]> false for:<[player1]>|<[player2]>
Usage Example
# Use to reset an entity's fake visibility state for the linked player.
- invisible <[entity]> reset for:<player>
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/InvisibleCommand.java#L32