程序包 org.bukkit.block

# 接口 Bell

所有超级接口:
  `BlockState`, `Metadatable`, `PersistentDataHolder`, `TileState`

public interface Bell extends TileState
代表钟.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `int`
  `getResonatingTicks()`
  Get the amount of ticks since this bell has been resonating, or 0 if the bell is not currently resonating.
  `int`
  `getShakingTicks()`
  Get the amount of ticks since this bell has been shaking, or 0 if the bell is not currently shaking.
  `boolean`
  `isResonating()`
  Check whether or not this bell is resonating.
  `boolean`
  `isShaking()`
  Check whether or not this bell is shaking.
  `boolean`
  `ring()`
  Ring this bell in the direction that the bell is facing.
  `boolean`
  `ring(@Nullable BlockFace direction)`
  Ring this bell.
  `boolean`
  `ring(@Nullable Entity entity)`
  Ring this bell in the direction that the bell is facing.
  `boolean`
  `ring(@Nullable Entity entity, @Nullable BlockFace direction)`
  Ring this bell.

  ### 从接口继承的方法 org.bukkit.block.BlockState

  `copy, copy, getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update`

  ### 从接口继承的方法 org.bukkit.metadata.Metadatable

  `getMetadata, hasMetadata, removeMetadata, setMetadata`

  ### 从接口继承的方法 org.bukkit.block.TileState

  `getPersistentDataContainer`

- ## 方法详细资料

  - ### ring

    boolean ring(@Nullable @Nullable Entity entity, @Nullable @Nullable BlockFace direction)
    Ring this bell. This will call a `BellRingEvent`.
    参数:
      `entity` - the entity ringing the bell
      `direction` - the direction from which the bell was rung or null to ring in the direction that the bell is facing
    返回:
      true if rung successfully, false if the event was cancelled

  - ### ring

    boolean ring(@Nullable @Nullable Entity entity)
    Ring this bell in the direction that the bell is facing. This will call a `BellRingEvent`.
    参数:
      `entity` - the entity ringing the bell
    返回:
      true if rung successfully, false if the event was cancelled

  - ### ring

    boolean ring(@Nullable @Nullable BlockFace direction)
    Ring this bell. This will call a `BellRingEvent`.
    参数:
      `direction` - the direction from which the bell was rung or null to ring in the direction that the bell is facing
    返回:
      true if rung successfully, false if the event was cancelled

  - ### ring

    boolean ring()
    Ring this bell in the direction that the bell is facing. This will call a `BellRingEvent`.
    返回:
      true if rung successfully, false if the event was cancelled

  - ### isShaking

    boolean isShaking()
    Check whether or not this bell is shaking. A bell is considered to be shaking if it was recently rung.

    A bell will typically shake for 50 ticks.

    返回:
      true if shaking, false otherwise

  - ### getShakingTicks

    int getShakingTicks()
    Get the amount of ticks since this bell has been shaking, or 0 if the bell is not currently shaking.

    A bell will typically shake for 50 ticks.

    返回:
      the time in ticks since the bell was rung, or 0 if not shaking

  - ### isResonating

    boolean isResonating()
    Check whether or not this bell is resonating. A bell is considered to be resonating if `while shaking`, raiders were detected in the area and are ready to be highlighted to nearby players.

    A bell will typically resonate for 40 ticks.

    返回:
      true if resonating, false otherwise

  - ### getResonatingTicks

    int getResonatingTicks()
    Get the amount of ticks since this bell has been resonating, or 0 if the bell is not currently resonating.

    A bell will typically resonate for 40 ticks.

    返回:
      the time in ticks since the bell has been resonating, or 0 if not resonating