接口 SkullMeta

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

public interface SkullMeta extends ItemMeta
代表头颅.
  • 方法详细资料

    • 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)
      已过时。
      设置这个头颅的主人.

      原文: 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

      指定者:
      clone 在接口中 ItemMeta