程序包 org.bukkit.inventory.meta

# 接口 SkullMeta

所有超级接口:
  `Cloneable`, `ConfigurationSerializable`, `ItemMeta`, `PersistentDataHolder`

public interface SkullMeta extends ItemMeta
代表头颅.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull SkullMeta`
  `clone()`
  `@Nullable NamespacedKey`
  `getNoteBlockSound()`
  Gets the sound to play if the skull is placed on a note block.
  `@Nullable String`
  `getOwner()`
  已过时。
  另请参阅 `getOwningPlayer()`..
  `@Nullable PlayerProfile`
  `getOwnerProfile()`
  获取拥有此头颅的玩家的资料.
  `@Nullable OfflinePlayer`
  `getOwningPlayer()`
  获取这个头颅的主人.
  `boolean`
  `hasOwner()`
  检测这个头颅是否有主人.
  `void`
  `setNoteBlockSound(@Nullable NamespacedKey noteBlockSound)`
  Sets the sound to play if the skull is placed on a note block.
  `boolean`
  `setOwner(@Nullable String owner)`
  已过时。
  另请参阅 `setOwningPlayer(org.bukkit.OfflinePlayer)`.
  `void`
  `setOwnerProfile(@Nullable PlayerProfile profile)`
  设置拥有此头颅的玩家的资料.
  `boolean`
  `setOwningPlayer(@Nullable OfflinePlayer owner)`
  设置这个头颅的主人.

  ### 从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable

  `serialize`

  ### 从接口继承的方法 org.bukkit.inventory.meta.ItemMeta

  `addAttributeModifier, addEnchant, addItemFlags, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getMaxStackSize, getRarity, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasRarity, hasTool, isFireResistant, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setMaxStackSize, setRarity, setTool, setUnbreakable, setVersion`

  ### 从接口继承的方法 org.bukkit.persistence.PersistentDataHolder

  `getPersistentDataContainer`

- ## 方法详细资料

  - ### getOwner

    @Deprecated @Nullable @Nullable String getOwner()
    已过时。
    另请参阅 `getOwningPlayer()`..
    获取这个头颅的主人.

    原文: Gets the owner of the skull.

    返回:
      头颅的主人

  - ### hasOwner

    boolean hasOwner()
    检测这个头颅是否有主人.

    原文: Checks to see if the skull has an owner.

    返回:
      true 表示头颅有主人

  - ### setOwner

    @Deprecated boolean setOwner(@Nullable @Nullable String owner)
    已过时。
    另请参阅 `setOwningPlayer(org.bukkit.OfflinePlayer)`.
    设置这个头颅的主人.

    原文: Sets the owner of the skull.

    参数:
      `owner` - 头颅的新主人
    返回:
      如果头颅主人成功被设置则为 true

  - ### getOwningPlayer

    @Nullable @Nullable OfflinePlayer getOwningPlayer()
    获取这个头颅的主人.

    原文: Gets the owner of the skull.

    返回:
      头颅的主人

  - ### setOwningPlayer

    boolean setOwningPlayer(@Nullable @Nullable OfflinePlayer owner)
    设置这个头颅的主人.

    插件应该在调用这个方法之前检查 hasOwner() 是否返回true.

    原文: Sets the owner of the skull.

    Plugins should check that hasOwner() returns true before calling this plugin.

    参数:
      `owner` - 头颅的新主人
    返回:
      如果头颅主人成功被设置则为 true

  - ### getOwnerProfile

    @Nullable @Nullable PlayerProfile getOwnerProfile()
    获取拥有此头颅的玩家的资料. 此玩家资料所含的纹理取决于头颅类型.

    原文:Gets the profile of the player who owns the skull. This player profile may appear as the texture depending on skull type.

    返回:
      头颅所有者的资料

  - ### setOwnerProfile

    void setOwnerProfile(@Nullable @Nullable PlayerProfile profile)
    设置拥有此头颅的玩家的资料. 此玩家资料所含的纹理取决于头颅类型.

    此资料必须包含唯一 id 和皮肤纹理. 如果两者都缺, 则资料必须包含玩家名, 服务器将利用玩家名来尝试查找其唯一 id 和皮肤纹理.

    原文:Sets the profile of the player who owns the skull. This player profile may appear as the texture depending on skull type.

    The profile must contain both a unique id and a skin texture. If either of these is missing, the profile must contain a name by which the server will then attempt to look up the unique id and skin texture.

    参数:
      `profile` - 头颅所有者的资料
    抛出:
      `IllegalArgumentException` - 如果资料没有包含必要信息

  - ### setNoteBlockSound

    void setNoteBlockSound(@Nullable @Nullable NamespacedKey noteBlockSound)
    Sets the sound to play if the skull is placed on a note block.
    Note: This only works for player heads. For other heads, see `Instrument`.
    参数:
      `noteBlockSound` - the key of the sound to be played, or null

  - ### getNoteBlockSound

    @Nullable @Nullable NamespacedKey getNoteBlockSound()
    Gets the sound to play if the skull is placed on a note block.
    Note: This only works for player heads. For other heads, see `Instrument`.
    返回:
      the key of the sound, or null

  - ### clone

    @NotNull @NotNull SkullMeta clone()
    指定者:
      `clone` 在接口中 `ItemMeta`