Class VelocityPartiesPlayerPreChatEvent
java.lang.Object
com.alessiodp.parties.api.events.velocity.VelocityPartiesEvent
com.alessiodp.parties.api.events.velocity.player.VelocityPartiesPlayerPreChatEvent
- All Implemented Interfaces:
Cancellable,IPlayerPreChatEvent,PartiesEvent
public class VelocityPartiesPlayerPreChatEvent
extends VelocityPartiesEvent
implements IPlayerPreChatEvent
-
Constructor Summary
ConstructorsConstructorDescriptionVelocityPartiesPlayerPreChatEvent(PartyPlayer player, Party party, String formattedMessage, String message) -
Method Summary
Modifier and TypeMethodDescription@NotNull StringGet the formatted message of the player@NotNull StringGet the message of the player@NotNull PartygetParty()Get the party@NotNull PartyPlayerGet the player who sent the messagebooleanIs the event cancelled?voidsetCancelled(boolean cancel) Set the event as cancelledvoidsetFormattedMessage(String formattedMessage) Set the formatted message of the player.voidsetMessage(String message) Set the message of the playerMethods inherited from class com.alessiodp.parties.api.events.velocity.VelocityPartiesEvent
getApi, setApiMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.alessiodp.parties.api.events.PartiesEvent
getApi, setApi
-
Constructor Details
-
VelocityPartiesPlayerPreChatEvent
public VelocityPartiesPlayerPreChatEvent(PartyPlayer player, Party party, String formattedMessage, String message)
-
-
Method Details
-
getPartyPlayer
Description copied from interface:IPlayerPreChatEventGet the player who sent the message- Specified by:
getPartyPlayerin interfaceIPlayerPreChatEvent- Returns:
- the
PartyPlayer
-
getParty
Description copied from interface:IPlayerPreChatEventGet the party- Specified by:
getPartyin interfaceIPlayerPreChatEvent- Returns:
- the
Party
-
getFormattedMessage
Description copied from interface:IPlayerPreChatEventGet the formatted message of the player- Specified by:
getFormattedMessagein interfaceIPlayerPreChatEvent- Returns:
- the formatted message
-
setFormattedMessage
Description copied from interface:IPlayerPreChatEventSet the formatted message of the player. This message should contain %message% placeholder- Specified by:
setFormattedMessagein interfaceIPlayerPreChatEvent- Parameters:
formattedMessage- the formatted message to set
-
getMessage
Description copied from interface:IPlayerPreChatEventGet the message of the player- Specified by:
getMessagein interfaceIPlayerPreChatEvent- Returns:
- the message
-
setMessage
Description copied from interface:IPlayerPreChatEventSet the message of the player- Specified by:
setMessagein interfaceIPlayerPreChatEvent- Parameters:
message- the message to set
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableIs the event cancelled?- Specified by:
isCancelledin interfaceCancellable- Returns:
trueif the event is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:CancellableSet the event as cancelled- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel-trueto cancel
-