类 GroupRenamedEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.group.GroupRenamedEvent
- 所有已实现的接口:
org.bukkit.event.Cancellable
Event triggered when a group is renamed within a dominion.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
org.bukkit.event.Event.Result -
构造器概要
构造器构造器说明GroupRenamedEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, @NotNull GroupDTO group, @NotNull String newName) Constructs a new GroupRenamedEvent. -
方法概要
修饰符和类型方法说明afterCreated(Consumer<GroupDTO> consumer) Call back after the group is renamed.@NotNull DominionDTOGets the dominion to which the group belongs.Gets the CompletableFuture that will be completed with the renamed GroupDTO.@NotNull GroupDTOgetGroup()Gets the group being renamed.Gets the new name of the group with color codes.Gets the plain text new name of the group without color codes.Gets the old name of the group with color codes.Gets the plain text old name of the group without color codes.voidSets the group being renamed.voidsetNewName(@NotNull String newName) Sets the new name of the group.从类继承的方法 cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelled从类继承的方法 cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers从类继承的方法 org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
构造器详细资料
-
GroupRenamedEvent
public GroupRenamedEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull GroupDTO group, @NotNull @NotNull String newName) Constructs a new GroupRenamedEvent.- 参数:
operator- the command sender who initiated the eventdominion- the dominion to which the group belongsgroup- the group being renamednewName- the new name of the group
-
-
方法详细资料
-
getDominion
Gets the dominion to which the group belongs.- 返回:
- the dominion
-
getGroup
Gets the group being renamed.- 返回:
- the group
-
setGroup
Sets the group being renamed.- 参数:
group- the group to set
-
setNewName
Sets the new name of the group.- 参数:
newName- the new name to set
-
getNewNameColored
Gets the new name of the group with color codes.- 返回:
- the new name of the group with color codes
-
getNewNamePlain
Gets the plain text new name of the group without color codes.- 返回:
- the plain text new name of the group
-
getOldNameColored
Gets the old name of the group with color codes.- 返回:
- the old name of the group with color codes
-
getOldNamePlain
Gets the plain text old name of the group without color codes.- 返回:
- the plain text old name of the group
-
getFutureToComplete
Gets the CompletableFuture that will be completed with the renamed GroupDTO.Under most circumstances, you should not need to use this method directly. If you need to perform actions after the group is renamed, you should use the
afterCreated(Consumer)method instead.- 返回:
- the CompletableFuture to be completed
-
afterCreated
Call back after the group is renamed.Use this method to perform actions after the group has been renamed (may fail), if you need to do something with the renamed group,
- 参数:
consumer- the consumer to handle the renamed group- 返回:
- a CompletableFuture that completes when the consumer has been executed
-