001 package org.bukkit.event.player; 002 003 import org.bukkit.entity.Player; 004 import org.bukkit.event.HandlerList; 005 006 /** 007 * Called when a player leaves a server 008 */ 009 public class PlayerQuitEvent extends PlayerEvent { 010 private static final HandlerList handlers = new HandlerList(); 011 private String quitMessage; 012 013 public PlayerQuitEvent(final Player who, final String quitMessage) { 014 super(who); 015 this.quitMessage = quitMessage; 016 } 017 018 /** 019 * Gets the quit message to send to all online players 020 * 021 * @return string quit message 022 */ 023 public String getQuitMessage() { 024 return quitMessage; 025 } 026 027 /** 028 * Sets the quit message to send to all online players 029 * 030 * @param quitMessage quit message 031 */ 032 public void setQuitMessage(String quitMessage) { 033 this.quitMessage = quitMessage; 034 } 035 036 @Override 037 public HandlerList getHandlers() { 038 return handlers; 039 } 040 041 public static HandlerList getHandlerList() { 042 return handlers; 043 } 044 }