BlockPistonEvent
BlockPistonEvent
=> org.bukkit.event.Event
=> org.bukkit.event.block.BlockEvent
=> org.bukkit.event.block.BlockPistonEvent
Called when a piston block is triggered代表与活塞伸缩有关的事件。译注:该事件未实现getHandlers()
和getHandlerList()
方法,无法直接监听。
方法声明: public boolean isCancelled()
方法签名: ()Z
方法声明: public void setCancelled(boolean cancelled)
方法签名: (Z)V
方法声明: public boolean isSticky()
方法签名: ()Z
Returns true if the Piston in the event is sticky.@return stickiness of the piston该方法用于获取涉事活塞是否为粘性活塞。如为粘性活塞则返回true
。@return 涉事活塞是否为粘性活塞。
方法声明: public BlockFace getDirection()
方法签名: ()Lorg/bukkit/block/BlockFace;
Return the direction in which the piston will operate.@return direction of the piston该方法用于获取活塞伸缩时的朝向。@return 活塞的朝向。
Last modified 1mo ago