Package adhdmc.simplepms.events
Class PrivateMessageEvent
java.lang.Object
org.bukkit.event.Event
adhdmc.simplepms.events.PrivateMessageEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PrivateMessageEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Called when a private message is sent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPrivateMessageEvent
(org.bukkit.command.CommandSender initiator, org.bukkit.command.CommandSender recipient, String messageContent, HashSet<org.bukkit.entity.Player> spyingPlayers) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
Gets the handlerList for this event@NotNull org.bukkit.event.HandlerList
org.bukkit.command.CommandSender
Gets the CommandSender who sent the messageGets the content of the message being sentorg.bukkit.command.CommandSender
Gets the CommandSender who is to receive the messageSet<org.bukkit.entity.Player>
Gets the list of players who currently have SocialSpy toggled onboolean
Checks whether this event has been cancelledvoid
setCancelled
(boolean cancel) Sets whether this event should be cancelledMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Field Details
-
initiator
private final org.bukkit.command.CommandSender initiator -
recipient
private final org.bukkit.command.CommandSender recipient -
messageContent
-
spyingPlayers
-
cancelled
private boolean cancelled -
handlers
private static final org.bukkit.event.HandlerList handlers
-
-
Constructor Details
-
PrivateMessageEvent
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Gets the handlerList for this event- Returns:
- HandlerList
-
getInitiator
public org.bukkit.command.CommandSender getInitiator()Gets the CommandSender who sent the message- Returns:
- CommandSender
-
getRecipient
public org.bukkit.command.CommandSender getRecipient()Gets the CommandSender who is to receive the message- Returns:
- CommandSender
-
getMessageContent
Gets the content of the message being sent- Returns:
- String
-
getSpyingPlayers
Gets the list of players who currently have SocialSpy toggled on- Returns:
Set<Player>
-
isCancelled
public boolean isCancelled()Checks whether this event has been cancelled- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
- Returns:
- boolean
-
setCancelled
public void setCancelled(boolean cancel) Sets whether this event should be cancelled- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
- Parameters:
cancel
- boolean
-