Class DominionSetMessageEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.dominion.modify.DominionModifyEvent
cn.lunadeer.dominion.events.dominion.modify.DominionSetMessageEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Event triggered when a message is set for a Dominion in the Dominion system.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the type of message being set.Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionDominionSetMessageEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, DominionSetMessageEvent.TYPE type, @NotNull String newMessage) Constructs a new DominionSetMessageEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringGets the new message content.@NotNull StringGets the old message content.getType()Gets the type of the message being set.voidsetNewMessage(@NotNull String newMessage) Sets the new message content.Methods inherited from class cn.lunadeer.dominion.events.dominion.modify.DominionModifyEvent
afterModified, getDominion, getFutureToComplete, setDominionMethods inherited from class cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelledMethods inherited from class cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlersMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
DominionSetMessageEvent
public DominionSetMessageEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull DominionSetMessageEvent.TYPE type, @NotNull @NotNull String newMessage) Constructs a new DominionSetMessageEvent.- Parameters:
operator- the command sender who initiated the eventdominion- the dominion for which the message is being settype- the type of the message being setnewMessage- the new message content
-
-
Method Details
-
getOldMessage
Gets the old message content.- Returns:
- the old message content
-
getType
Gets the type of the message being set.- Returns:
- the type of the message
-
getNewMessage
Gets the new message content.- Returns:
- the new message content
-
setNewMessage
Sets the new message content.Changes made in
EventPriorityHIGH or higherEventHandlerwill not take effect. (Default isEventPriority.NORMAL)- Parameters:
newMessage- the new message content
-