diff options
-rw-r--r-- | src/main/java/org/bukkit/event/player/PlayerQuitEvent.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java index d4c0e96d..bbeea606 100644 --- a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java @@ -3,7 +3,30 @@ package org.bukkit.event.player; import org.bukkit.entity.Player; public class PlayerQuitEvent extends PlayerEvent { - public PlayerQuitEvent(Player who) { + + private String quitMessage; + + public PlayerQuitEvent(Player who, String quitMessage) { super(Type.PLAYER_QUIT, who); + this.quitMessage = quitMessage; + } + + /** + * Gets the quit message to send to all online players + * + * @return string quit message + */ + public String getQuitMessage() { + return quitMessage; } + + /** + * Sets the quit message to send to all online players + * + * @param quitMessage quit message + */ + public void setQuitMessage(String quitMessage) { + this.quitMessage = quitMessage; + } + } |