Problems with set name of last spawned entity

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

BoQsc

Member
Jun 30, 2019
2
0
0
27
I'm using Spigot version 1.14.2
Latest version of Skript from https://github.com/SkriptLang/Skript/releases

Nothing else.

And it seems I have a problem with set name of last spawned entity statement.

Every time entity is spawn, the name of the custom entity's name cannot be seen until I come closer to the entity and point the mouse cursor right into their head.

What causes this to happen? Is it how naming work in Minecraft? (The names cannot be seen of custom entities, until you point your cursor right to their head?)

What I want to happen:

Spawn an Entity and see Entity's name all the time without disappearance, no matter where my cursor is pointing to.

Code:
on spawn:
    set name of last spawned entity to "&5Logger"

command /testmob:
    trigger:
        spawn 1 villager at player's location
[doublepost=1562527705,1562509546][/doublepost]This is the correct solution. Sourced from https://github.com/SkriptLang/Skript/issues/2236
Code:
on spawn:
    set display name of event-entity to "&5Logger"


command /testmob:
   trigger:
       spawn 1 villager at player's location
 
Yes, that is how names work in Minecraft. To view the name of an entity, it must be in your attack range and you must aim at them. I think there is an NBT tag to make the name visible at all times, and it is
Code:
CustomNameVisible: 1
. To add such NBT tags, look into NBT editing in Skript. A google search will help you out.
 
Status
Not open for further replies.