接口 SkullMeta
-
方法概要
修饰符和类型方法说明clone()获取在音符盒上放置此头颅时播放的音效.getOwner()已过时。获取拥有此头颅的玩家的资料.获取这个头颅的主人.booleanhasOwner()检测这个头颅是否有主人.voidsetNoteBlockSound(@Nullable NamespacedKey noteBlockSound) 设置在音符盒上放置此头颅时播放的音效.boolean已过时。voidsetOwnerProfile(@Nullable PlayerProfile profile) 设置拥有此头颅的玩家的资料.boolean设置这个头颅的主人.从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize从接口继承的方法 org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, getAsComponentString, getAsString, getAttackRange, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getBlocksAttacks, getBreakSound, getConsumable, getCustomModelData, getCustomModelDataComponent, getCustomTagContainer, getDamageResistant, getDamageType, getDamageTypeKey, getDisplayName, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippable, getFood, getItemFlags, getItemModel, getItemName, getJukeboxPlayable, getKineticWeapon, getLocalizedName, getLore, getMaxStackSize, getMinimumAttackCharge, getPiercingWeapon, getRarity, getSwingAnimation, getTool, getTooltipStyle, getUseCooldown, getUseEffects, getUseRemainder, getWeapon, hasAttackRange, hasAttributeModifiers, hasBlocksAttacks, hasBreakSound, hasConflictingEnchant, hasConsumable, hasCustomModelData, hasCustomModelDataComponent, hasDamageResistant, hasDamageType, hasDisplayName, hasEnchant, hasEnchantable, hasEnchantmentGlintOverride, hasEnchants, hasEquippable, hasFood, hasItemFlag, hasItemModel, hasItemName, hasJukeboxPlayable, hasKineticWeapon, hasLocalizedName, hasLore, hasMaxStackSize, hasMinimumAttackCharge, hasPiercingWeapon, hasRarity, hasSwingAnimation, hasTool, hasTooltipStyle, hasUseCooldown, hasUseEffects, hasUseRemainder, hasWeapon, isFireResistant, isGlider, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttackRange, setAttributeModifiers, setBlocksAttacks, setBreakSound, setConsumable, setCustomModelData, setCustomModelDataComponent, setDamageResistant, setDamageType, setDamageTypeKey, setDisplayName, setEnchantable, setEnchantmentGlintOverride, setEquippable, setFireResistant, setFood, setGlider, setHideTooltip, setItemModel, setItemName, setJukeboxPlayable, setKineticWeapon, setLocalizedName, setLore, setMaxStackSize, setMinimumAttackCharge, setPiercingWeapon, setRarity, setSwingAnimation, setTool, setTooltipStyle, setUnbreakable, setUseCooldown, setUseEffects, setUseRemainder, setVersion, setWeapon从接口继承的方法 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
设置在音符盒上放置此头颅时播放的音效.
注意: 这仅对玩家头颅有效. 对于其他类型的头颅, 请参阅Instrument.原文: 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- 要播放的音效对应的命名空间键, 设置为 null 以清除
-
getNoteBlockSound
获取在音符盒上放置此头颅时播放的音效.
注意: 这仅对玩家头颅有效. 对于其他类型的头颅, 请参阅Instrument.原文: 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.- 返回:
- 音效对应的命名空间键, 如果未设置则返回 null
-
clone
-
getOwningPlayer()..