diff options
author | Raphfrk <raphfrk@gmail.com> | 2011-04-02 15:40:25 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-04-02 18:25:33 +0200 |
commit | 04ddb17fceb195b6fdca62abc5e2aba8b973ccd4 (patch) | |
tree | 4586585bc5d242c9c4e2e9ef644fea61723f6839 /src | |
parent | a8be58032fa4c3924e97ff4059d021b3c506ff2b (diff) | |
download | bukkit-04ddb17fceb195b6fdca62abc5e2aba8b973ccd4.tar bukkit-04ddb17fceb195b6fdca62abc5e2aba8b973ccd4.tar.gz bukkit-04ddb17fceb195b6fdca62abc5e2aba8b973ccd4.tar.lz bukkit-04ddb17fceb195b6fdca62abc5e2aba8b973ccd4.tar.xz bukkit-04ddb17fceb195b6fdca62abc5e2aba8b973ccd4.zip |
Added the ability to set the quit message
Diffstat (limited to 'src')
-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; + } + } |