类 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 is created within a dominion.
This event is triggered when a group is added.
After a successful addition, the new group can be obtained via getGroup().
If the addition fails, getGroup() returns null.
-
嵌套类概要
从类继承的嵌套类/接口 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. -
方法概要
修饰符和类型方法说明@NotNull DominionDTOGets the dominion to which the group belongs.@Nullable GroupDTOgetGroup()Gets the newly created group.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.voidSets the group being created.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
-
setGroup
Sets the group being created.- 参数:
group- the group to set
-
getGroup
Gets the newly created group. If the addition fails, returns null.- 返回:
- the newly created group, or null if the addition fails
-