# SetEntityFlag

TIP

  • setEntityFlag(<entity_ID>, <flag>, <value>)
  • Sets flags for an entity, you can replace <flag> with one of the following:
'nametag-visible' | 'nametag-always-visible' | 'auto-jump'
'can-climb-walls' | 'has-gravity' | 'can-take-damage'
  • <value> must be boolean either TRUE or FALSE, all flags are TRUE by default.

# Parameters

  • <entity_ID> The entity ID as int
  • <flag> The flag to modify as string
  • <value> The value of the flag as bool

# Example

1: $id$ = spawnEntity("Creeper", $world$, $x$, $y$ + 10, $z$)
2: setEntityFlag($id$, 'has-gravity', $false$)
3: setEntityFlag($id$, "can-take-damage", $false$)