Class BukkitPartiesPlayerPreChatEvent
java.lang.Object
org.bukkit.event.Event
com.alessiodp.parties.api.events.bukkit.BukkitPartiesEvent
com.alessiodp.parties.api.events.bukkit.player.BukkitPartiesPlayerPreChatEvent
- All Implemented Interfaces:
Cancellable,IPlayerPreChatEvent,PartiesEvent,org.bukkit.event.Cancellable
public class BukkitPartiesPlayerPreChatEvent
extends BukkitPartiesEvent
implements IPlayerPreChatEvent, org.bukkit.event.Cancellable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionBukkitPartiesPlayerPreChatEvent(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.bukkit.BukkitPartiesEvent
getApi, getHandlerList, getHandlers, setApiMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronousMethods 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
-
BukkitPartiesPlayerPreChatEvent
public BukkitPartiesPlayerPreChatEvent(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- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- 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- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancel-trueto cancel
-