getName

open fun getName(): String

Gets the name of the entity, could be "Villager", or, if the entity has a custom name, it returns that.

Return

the (custom) name of the entity

Sources

Link copied to clipboard