Class MemberAddedEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.member.MemberAddedEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
成员添加事件
当玩家添加成员时触发
添加成功后可以通过 getMember()
获取新添加的成员
如果添加失败则 getMember()
返回null
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionMemberAddedEvent
(@NotNull AbstractOperator operator, @NotNull DominionDTO dominion, @NotNull PlayerDTO player) -
Method Summary
Modifier and TypeMethodDescription@NotNull DominionDTO
获取领地@Nullable MemberDTO
获取新添加的成员,如果没有则返回null,只有添加成功后才会有值@NotNull PlayerDTO
获取玩家void
setDominion
(@NotNull DominionDTO dominion) void
设置新添加的成员void
Methods inherited from class cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelled, setCancelled, setCancelledAdnComplete
Methods inherited from class cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
MemberAddedEvent
public MemberAddedEvent(@NotNull @NotNull AbstractOperator operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull PlayerDTO player)
-
-
Method Details
-
setDominion
-
getDominion
获取领地- Returns:
- 领地
-
setPlayer
-
getPlayer
获取玩家- Returns:
- 玩家
-
setMember
设置新添加的成员- Parameters:
member
- 新添加的成员
-
getMember
获取新添加的成员,如果没有则返回null,只有添加成功后才会有值- Returns:
- 新添加的成员
-