接口 Bell
- 所有超级接口:
BlockState,Metadatable,PersistentDataHolder,TileState
-
方法概要
修饰符和类型方法说明int获取此钟开始共鸣以来的游戏刻数, 如果钟当前未共鸣则返回0.int获取此钟开始摇晃以来的游戏刻数, 如果钟当前未摇晃则返回0.boolean检查此钟是否正在共鸣.boolean检查此钟是否正在摇晃.booleanring()按钟面对的方向敲响此钟.boolean敲响此钟.boolean按钟面对的方向敲响此钟.boolean敲响此钟.从接口继承的方法 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
敲响此钟. 这将调用一个BellRingEvent.原文: Ring this bell. This will call a
BellRingEvent.- 参数:
entity- 敲响钟的实体direction- 钟被敲响的方向, 或null表示按钟面对的方向敲响- 返回:
- 如果成功敲响返回true, 如果事件被取消返回false
-
ring
按钟面对的方向敲响此钟. 这将调用一个BellRingEvent.原文: Ring this bell in the direction that the bell is facing. This will call a
BellRingEvent.- 参数:
entity- 敲响钟的实体- 返回:
- 如果成功敲响返回true, 如果事件被取消返回false
-
ring
敲响此钟. 这将调用一个BellRingEvent.原文: Ring this bell. This will call a
BellRingEvent.- 参数:
direction- 钟被敲响的方向, 或null表示按钟面对的方向敲响- 返回:
- 如果成功敲响返回true, 如果事件被取消返回false
-
ring
boolean ring()按钟面对的方向敲响此钟. 这将调用一个BellRingEvent.原文: Ring this bell in the direction that the bell is facing. This will call a
BellRingEvent.- 返回:
- 如果成功敲响返回true, 如果事件被取消返回false
-
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. 钟通常会摇晃50个游戏刻.
- 返回:
- 如果正在摇晃返回true, 否则返回false
-
getShakingTicks
int getShakingTicks()获取此钟开始摇晃以来的游戏刻数, 如果钟当前未摇晃则返回0.原文: 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. 钟通常会摇晃50个游戏刻.
- 返回:
- 自钟被敲响以来的时间(以游戏刻计), 如果未摇晃则返回0
-
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. 钟通常会共鸣40个游戏刻.
- 返回:
- 如果正在共鸣返回true, 否则返回false
-
getResonatingTicks
int getResonatingTicks()获取此钟开始共鸣以来的游戏刻数, 如果钟当前未共鸣则返回0.原文: 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. 钟通常会共鸣40个游戏刻.
- 返回:
- 自钟开始共鸣以来的时间(以游戏刻计), 如果未共鸣则返回0
-