类 PlayerCrossDominionBorderEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.PlayerCrossDominionBorderEvent
Event triggered when a player crosses a dominion border, which includes entering, leaving, or moving from one dominion to another.
When a player moves from a location without a dominion to inside a dominion, `from` is null.
When a player moves from inside a dominion to a location without a dominion, `to` is null.
Typically, `from` and `to` can both be null but not at the same time, and if both are not null, they will not be the same.
For listening to player entering dominion events, refer to
PlayerMoveInDominionEvent.
For listening to player leaving dominion events, refer to PlayerMoveOutDominionEvent.-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
org.bukkit.event.Event.Result -
构造器概要
构造器构造器说明PlayerCrossDominionBorderEvent(@NotNull org.bukkit.entity.Player player, @Nullable DominionDTO from, @Nullable DominionDTO to) Constructs a new PlayerCrossDominionBorderEvent. -
方法概要
修饰符和类型方法说明@Nullable DominionDTOgetFrom()Gets the dominion the player moved from.@NotNull org.bukkit.entity.PlayerGets the player who crossed the border.@Nullable DominionDTOgetTo()Gets the dominion the player moved to.从类继承的方法 cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers从类继承的方法 org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
构造器详细资料
-
PlayerCrossDominionBorderEvent
public PlayerCrossDominionBorderEvent(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable DominionDTO from, @Nullable @Nullable DominionDTO to) Constructs a new PlayerCrossDominionBorderEvent.- 参数:
player- the player who crossed the borderfrom- the dominion the player moved from, null if the player entered a dominionto- the dominion the player moved to, null if the player left a dominion
-
-
方法详细资料
-
getPlayer
@NotNull public @NotNull org.bukkit.entity.Player getPlayer()Gets the player who crossed the border.- 返回:
- the player
-
getFrom
Gets the dominion the player moved from.- 返回:
- the dominion, or null if the player entered a dominion
-
getTo
Gets the dominion the player moved to.- 返回:
- the dominion, or null if the player left a dominion
-