类 GroupCreateEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.group.GroupCreateEvent
- 所有已实现的接口:
org.bukkit.event.Cancellable
Event triggered when a group of a dominion is created.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
org.bukkit.event.Event.Result -
构造器概要
构造器构造器说明GroupCreateEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, @NotNull String groupName) Constructs a new GroupCreateEvent. -
方法概要
修饰符和类型方法说明afterCreated(Consumer<GroupDTO> consumer) Call back after the group is created.@NotNull DominionDTOGets the dominion to which the group belongs.Gets the CompletableFuture that will be completed with the created GroupDTO.@Nullable GroupDTOgetGroup()已过时, 待删除: 此 API 元素将从以后的版本中删除。This method is deprecated and will be removed in future versions.Gets the name of the group with color codes.Gets the plain text name of the group without color codes.voidsetDominion(@NotNull DominionDTO dominion) Sets the dominion to which the group belongs.void已过时, 待删除: 此 API 元素将从以后的版本中删除。This method is deprecated and will be removed in future versions.voidsetGroupNameColored(String groupName) Sets the name of the group with color codes.从类继承的方法 cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelled从类继承的方法 cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers从类继承的方法 org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
构造器详细资料
-
GroupCreateEvent
public GroupCreateEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull String groupName) Constructs a new GroupCreateEvent.- 参数:
operator- the command sender who initiated the eventdominion- the dominion to which the group belongsgroupName- the name of the group being created
-
-
方法详细资料
-
setDominion
Sets the dominion to which the group belongs.- 参数:
dominion- the dominion to set
-
getDominion
Gets the dominion to which the group belongs.- 返回:
- the dominion
-
setGroupNameColored
Sets the name of the group with color codes.- 参数:
groupName- the name of the group with color codes
-
getGroupNameColored
Gets the name of the group with color codes.- 返回:
- the name of the group with color codes
-
getGroupNamePlain
Gets the plain text name of the group without color codes.- 返回:
- the plain text name of the group
-
getFutureToComplete
Gets the CompletableFuture that will be completed with the created GroupDTO.Under most circumstances, you should not need to use this method directly. If you need to perform actions after the group is created, you should use the
afterCreated(Consumer)method instead.- 返回:
- the CompletableFuture to be completed
-
afterCreated
Call back after the group is created.Use this method to perform actions after the group has been created (may fail), if you need to do something with the created group,
- 参数:
consumer- the consumer to handle the created group- 返回:
- a CompletableFuture that completes when the consumer has been executed
-
setGroup
已过时, 待删除: 此 API 元素将从以后的版本中删除。This method is deprecated and will be removed in future versions.- 参数:
group- the group to set
-
getGroup
已过时, 待删除: 此 API 元素将从以后的版本中删除。This method is deprecated and will be removed in future versions. To get the created dominion, use theafterCreated(Consumer)method instead.
-