Seperated kick/ban messages

This commit is contained in:
Intyre 2015-12-22 21:26:26 +01:00
parent fb87165cd5
commit 78525e1f74
No known key found for this signature in database
GPG Key ID: B06D41D26935005A

View File

@ -2909,7 +2909,11 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->server->getPluginManager()->callEvent($ev = new PlayerKickEvent($this, $reason, $this->getLeaveMessage()));
if(!$ev->isCancelled()){
if($isAdmin){
$message = "Kicked by admin." . ($reason !== "" ? " Reason: " . $reason : "");
if(!$this->isBanned()) {
$message = "Kicked by admin." . ($reason !== "" ? " Reason: " . $reason : "");
}else{
$message = $reason;
}
}else{
if($reason === ""){
$message = "disconnectionScreen.noReason";