接口 SkullMeta
-
方法概要
修饰符和类型方法说明clone()
Gets the sound to play if the skull is placed on a note block.getOwner()
已过时。获取拥有此头颅的玩家的资料.获取这个头颅的主人.boolean
hasOwner()
检测这个头颅是否有主人.void
setNoteBlockSound
(@Nullable NamespacedKey noteBlockSound) Sets the sound to play if the skull is placed on a note block.boolean
已过时。void
setOwnerProfile
(@Nullable PlayerProfile profile) 设置拥有此头颅的玩家的资料.boolean
设置这个头颅的主人.从接口继承的方法 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
已过时。另请参阅getOwningPlayer()
..获取这个头颅的主人.原文: Gets the owner of the skull.
- 返回:
- 头颅的主人
-
hasOwner
boolean hasOwner()检测这个头颅是否有主人.原文: Checks to see if the skull has an owner.
- 返回:
- true 表示头颅有主人
-
setOwner
已过时。设置这个头颅的主人.原文: Sets the owner of the skull.
- 参数:
owner
- 头颅的新主人- 返回:
- 如果头颅主人成功被设置则为 true
-
getOwningPlayer
获取这个头颅的主人.原文: Gets the owner of the skull.
- 返回:
- 头颅的主人
-
setOwningPlayer
设置这个头颅的主人.插件应该在调用这个方法之前检查 hasOwner() 是否返回true.
原文: Sets the owner of the skull.
Plugins should check that hasOwner() returns true before calling this plugin.
- 参数:
owner
- 头颅的新主人- 返回:
- 如果头颅主人成功被设置则为 true
-
getOwnerProfile
获取拥有此头颅的玩家的资料. 此玩家资料所含的纹理取决于头颅类型.原文:Gets the profile of the player who owns the skull. This player profile may appear as the texture depending on skull type.
- 返回:
- 头颅所有者的资料
-
setOwnerProfile
设置拥有此头颅的玩家的资料. 此玩家资料所含的纹理取决于头颅类型.此资料必须包含唯一 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
Sets the sound to play if the skull is placed on a note block.
Note: This only works for player heads. For other heads, seeInstrument
.- 参数:
noteBlockSound
- the key of the sound to be played, or null
-
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, seeInstrument
.- 返回:
- the key of the sound, or null
-
clone
-
getOwningPlayer()
..