Class GroupRenamedEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.group.GroupRenamedEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Event triggered when a group is renamed within a dominion.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionGroupRenamedEvent
(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, @NotNull GroupDTO group, @NotNull String newName) Constructs a new GroupRenamedEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull DominionDTO
Gets the dominion to which the group belongs.@NotNull GroupDTO
getGroup()
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.void
Sets the group being renamed.void
setNewName
(@NotNull String newName) Sets the new name of the group.Methods inherited from class cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelled
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
-
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.- Parameters:
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
-
-
Method Details
-
getDominion
Gets the dominion to which the group belongs.- Returns:
- the dominion
-
getGroup
Gets the group being renamed.- Returns:
- the group
-
setGroup
Sets the group being renamed.- Parameters:
group
- the group to set
-
setNewName
Sets the new name of the group.- Parameters:
newName
- the new name to set
-
getNewNameColored
Gets the new name of the group with color codes.- Returns:
- the new name of the group with color codes
-
getNewNamePlain
Gets the plain text new name of the group without color codes.- Returns:
- the plain text new name of the group
-
getOldNameColored
Gets the old name of the group with color codes.- Returns:
- the old name of the group with color codes
-
getOldNamePlain
Gets the plain text old name of the group without color codes.- Returns:
- the plain text old name of the group
-