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
Constructors Constructor Description VelocityPartiesPlayerPreChatEvent(PartyPlayer player, Party party, String formattedMessage, String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull StringgetFormattedMessage()Get the formatted message of the player@NotNull StringgetMessage()Get the message of the player@NotNull PartygetParty()Get the party@NotNull PartyPlayergetPartyPlayer()Get the player who sent the messagebooleanisCancelled()Is 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 player-
Methods inherited from class com.alessiodp.parties.api.events.velocity.VelocityPartiesEvent
getApi, setApi
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.alessiodp.parties.api.events.PartiesEvent
getApi, setApi
-
-
-
-
Constructor Detail
-
VelocityPartiesPlayerPreChatEvent
public VelocityPartiesPlayerPreChatEvent(PartyPlayer player, Party party, String formattedMessage, String message)
-
-
Method Detail
-
getPartyPlayer
@NotNull public @NotNull PartyPlayer getPartyPlayer()
Description copied from interface:IPlayerPreChatEventGet the player who sent the message- Specified by:
getPartyPlayerin interfaceIPlayerPreChatEvent- Returns:
- the
PartyPlayer
-
getParty
@NotNull public @NotNull Party getParty()
Description copied from interface:IPlayerPreChatEventGet the party- Specified by:
getPartyin interfaceIPlayerPreChatEvent- Returns:
- the
Party
-
getFormattedMessage
@NotNull public @NotNull String getFormattedMessage()
Description copied from interface:IPlayerPreChatEventGet the formatted message of the player- Specified by:
getFormattedMessagein interfaceIPlayerPreChatEvent- Returns:
- the formatted message
-
setFormattedMessage
public void setFormattedMessage(String formattedMessage)
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
@NotNull public @NotNull String getMessage()
Description copied from interface:IPlayerPreChatEventGet the message of the player- Specified by:
getMessagein interfaceIPlayerPreChatEvent- Returns:
- the message
-
setMessage
public void setMessage(String message)
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
-
-