mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 07:34:48 +01:00
Added the ability to set the quit message
By: Raphfrk <raphfrk@gmail.com>
This commit is contained in:
parent
db2b313ee6
commit
a977e93d7f
1 changed files with 24 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue