程序包 org.bukkit.inventory.meta

# 接口 CompassMeta

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

public interface CompassMeta extends ItemMeta
代表能追踪指定位置的指南针.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `CompassMeta`
  `clone()`
  `@Nullable Location`
  `getLodestone()`
  获取指南针指向的位置.
  `boolean`
  `hasLodestone()`
  检测此指南针是否与某个磁石配对 (是否为磁石指针).
  `boolean`
  `isLodestoneTracked()`
  获取指南针是否正追踪一个指定的磁石 (与磁石相绑定).
  `void`
  `setLodestone(@Nullable Location lodestone)`
  设置指南针指向的位置.
  `void`
  `setLodestoneTracked(boolean tracked)`
  设置指南针是否正追踪一个指定的磁石.

  ### 从接口继承的方法 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`

- ## 方法详细资料

  - ### hasLodestone

    boolean hasLodestone()
    检测此指南针是否与某个磁石配对 (是否为磁石指针).

    原文: Checks if this compass has been paired to a lodestone.

    返回:
      配对状态

  - ### getLodestone

    @Nullable @Nullable Location getLodestone()
    获取指南针指向的位置. 调用本方法前先检查 `hasLodestone()`!

    原文: Gets the location that this compass will point to. Check `hasLodestone()` first!

    返回:
      磁石位置

  - ### setLodestone

    void setLodestone(@Nullable @Nullable Location lodestone)
    设置指南针指向的位置.

    原文: Sets the location this lodestone compass will point to.

    参数:
      `lodestone` - 新位置, 或 null 以清除位置

  - ### isLodestoneTracked

    boolean isLodestoneTracked()
    获取指南针是否正追踪一个指定的磁石 (与磁石相绑定). 若为 true, 仅在追踪的位置有磁石时指南针才会正常工作.

    原文: Gets if this compass is tracking a specific lodestone. If true the compass will only work if there is a lodestone at the tracked location.

    返回:
      是否追踪磁石

  - ### setLodestoneTracked

    void setLodestoneTracked(boolean tracked)
    设置指南针是否正追踪一个指定的磁石. 若为 true, 仅在追踪的位置有磁石时指南针才会正常工作.

    原文: Sets if this compass is tracking a specific lodestone. If true the compass will only work if there is a lodestone at the tracked location.

    参数:
      `tracked` - 新的追踪状态

  - ### clone

    CompassMeta clone()
    指定者:
      `clone` 在接口中 `ItemMeta`