跳转至

Nameable

文档版本:1.21.0.24

Allows this entity to be named (e.g. using a name tag).

架构

nameable:
{
  boolean "allow_name_tag_renaming" : opt
  boolean "always_show" : opt
  trigger "default_trigger"
  array "name_actions" : opt
  {
    object "<any array element>" : opt
    {
      string "name_filter" : opt
      event_object "on_named"
    }
  }
  object "name_actions" : opt
  {
  }
}
allow_name_tag_renamingboolean
If true, this entity can be renamed with name tags.
always_showboolean
If true, the name will always be shown.
default_triggertrigger
Trigger to run when the entity gets named.
trigger:
string
trigger:
{
  string "event" : opt
  filters "filters"
  subject "target"
}
eventstring
The event to run when the conditions for this trigger are met.
filtersfilters
一个过滤器组。The list of conditions for this trigger to execute.
targetsubject
The target of the event.
subject:
string
trigger:
array
{
  object "<any array element>" : opt
  {
    string "event" : opt
    filters "filters"
    subject "target"
  }
}
<any array element>object
<any array element>
name_actionsarray
Describes the special names for this entity and the events to call when the entity acquires those names.
name_actions
<any array element>object
Describes the special names for this entity and the events to call when the entity acquires those names.
<any array element>
name_filterstring
List of special names that will cause the events defined in on_named to fire.
on_namedevent_object
Event to be called when this entity acquires the name specified in `name_filter'.
event_object:
{
  filters "filters"
  string "event" : opt
  string "target" : opt
}
filtersfilters
一个过滤器组
eventstring
The event to fire.
targetstring
The target of the event.
name_actionsobject
Describes the special names for this entity and the events to call when the entity acquires those names.
name_actions