类 PlayerFishEvent
- 所有已实现的接口:
Cancellable
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result -
字段概要
从类继承的字段 org.bukkit.event.player.PlayerEvent
player -
构造器概要
构造器构造器说明PlayerFishEvent(@NotNull Player player, @Nullable Entity entity, @NotNull FishHook hookEntity, @NotNull PlayerFishEvent.State state) PlayerFishEvent(@NotNull Player player, @Nullable Entity entity, @NotNull FishHook hookEntity, @Nullable EquipmentSlot hand, @NotNull PlayerFishEvent.State state) -
方法概要
修饰符和类型方法说明获取玩家钓到的实体.int获取钓鱼时获得的经验值.getHand()获取此事件中使用的手.static @NotNull HandlerListgetHook()获取钓鱼钩.getState()获取钓鱼的状态.boolean获取这个事件是否被取消.一个被取消的事件不会在服务器里执行,但是仍然会传递事件到其他插件.voidsetCancelled(boolean cancel) 取消这个事件.voidsetExpToDrop(int amount) 设置钓鱼时获得的经验值.从类继承的方法 org.bukkit.event.player.PlayerEvent
getPlayer从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
PlayerFishEvent
-
PlayerFishEvent
-
-
方法详细资料
-
getCaught
获取玩家钓到的实体.原文:Gets the entity caught by the player.
如果玩家钓鱼成功, 结果可以转换为
Item.- 返回:
- 玩家钓到的实体, 钓鱼时为实体, 如果鱼钩卡在地面上或什么都没钓到则为 null
-
getHook
获取钓鱼钩.原文:Gets the fishing hook.
- 返回:
- 代表钓鱼钩/浮标的实体
-
isCancelled
public boolean isCancelled()从接口复制的说明:Cancellable获取这个事件是否被取消.一个被取消的事件不会在服务器里执行,但是仍然会传递事件到其他插件.原文:Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
- 指定者:
isCancelled在接口中Cancellable- 返回:
- 如果事件已经被取消,则为true
-
setCancelled
public void setCancelled(boolean cancel) 从接口复制的说明:Cancellable取消这个事件. 一个被取消的事件不会在 服务器里执行,但是仍然会传递事件到其他插件.原文:Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
- 指定者:
setCancelled在接口中Cancellable- 参数:
cancel- 如果你想取消这个事件,则为true
-
getExpToDrop
public int getExpToDrop()获取钓鱼时获得的经验值.原文:Gets the amount of experience received when fishing.
注意: 除非事件状态为
PlayerFishEvent.State.CAUGHT_FISH, 否则此值没有默认效果.- 返回:
- 掉落的经验值数量
-
setExpToDrop
public void setExpToDrop(int amount) 设置钓鱼时获得的经验值.原文:Sets the amount of experience received when fishing.
注意: 除非事件状态为
PlayerFishEvent.State.CAUGHT_FISH, 否则此值没有默认效果.- 参数:
amount- 掉落的经验值数量
-
getHand
获取此事件中使用的手.原文:Get the hand that was used in this event.
使用的手仅在事件状态为
PlayerFishEvent.State.FISHING时存在. 在所有其他状态下, 手为 null.- 返回:
- 使用的手
-
getState
获取钓鱼的状态.原文:Gets the state of the fishing.
- 返回:
- 描述钓鱼状态的枚举值
-
getHandlers
- 指定者:
getHandlers在类中Event
-
getHandlerList
-