From 04ddb17fceb195b6fdca62abc5e2aba8b973ccd4 Mon Sep 17 00:00:00 2001 From: Raphfrk Date: Sat, 2 Apr 2011 15:40:25 +0100 Subject: Added the ability to set the quit message --- .../org/bukkit/event/player/PlayerQuitEvent.java | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'src') 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; + } + } -- cgit v1.2.3