Added the ability to set the quit message

By: Raphfrk <raphfrk@gmail.com>
This commit is contained in:
Bukkit/Spigot 2011-04-02 15:40:25 +01:00
parent db2b313ee6
commit a977e93d7f

View file

@ -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;
}
}