PlayerTeleportEvent
PlayerTeleportEvent
=> org.bukkit.event.Event
=> org.bukkit.event.player.PlayerEvent
=> org.bukkit.event.player.PlayerMoveEvent
=> org.bukkit.event.player.PlayerTeleportEvent
Holds information for player teleport events本事件存储了玩家传送的有关数据。译注:事件不是用来完成数据 的持久化存储的。此处所谓“存储”意为事件的字段中含有一些与涉事玩家有关的信息,该事件从服务端底层得到这些信息,存储于一些字段中,再给插件进行读取。当插件处理完毕以后,事件对象应该被销毁。不能使用事件对象来对数据进行保存。
方法声明: public TeleportCause getCause()
方法签名: ()Lorg/bukkit/event/player/PlayerTeleportEvent/TeleportCause;
Gets the cause of this teleportation event@return Cause of the event该方法用于获取玩家传送的原因。@return 一个Cause
枚举字段,用于确定传送的详细原因。
方法声明: public HandlerList getHandlers()
方法签名: ()Lorg/bukkit/event/HandlerList;
方法声明: public static HandlerList getHandlerList()
方法签名: ()Lorg/bukkit/event/HandlerList;
译注:无文档。该类系用于确定玩家传送原因的枚举。
Indicates the teleporation was caused by a player throwing an EnderPearl玩家掷出末影珍珠,因而发生传送。
Indicates the teleportation was caused by a player executing acommand玩家执行指令,因而发生传送。译注:如/tp
指令。
Indicates the teleportation was caused by a plugin插件调用某些方法,因而致使玩家发生传送。译注:如插件调用Player#teleport(Location location)
方法。
Indicates the teleportation was caused by a player entering aNether portal玩家步入下界传送门,因而发生传送。
Indicates the teleportation was caused by a player entering an Endportal玩家步入末地传送门,因而发生传送。
Indicates the teleportation was caused by a player teleporting to aEntity/Player via the spectator menu玩家在旁观模式界面中进行了选择,传送到某位玩家或某个实体身边。
Indicates the teleportation was caused by a player entering an Endgateway玩家步入末地折跃门,因而发生传送。
Indicates the teleportation was caused by a player consuming chorusfruit玩家服用紫颂果,因而发生传送。
Indicates the teleportation was caused by an event not covered bythis enum玩家传送的原因不属于上述任何一字段,本枚举暂时未能指明。