Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.player.PlayerKickEvent Class Reference
Inheritance diagram for org.bukkit.event.player.PlayerKickEvent:
org.bukkit.event.player.PlayerEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Public Member Functions

 PlayerKickEvent (final Player playerKicked, final String kickReason, final String leaveMessage)
 
String getReason ()
 
String getLeaveMessage ()
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
void setReason (String kickReason)
 
void setLeaveMessage (String leaveMessage)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.player.PlayerEvent
 PlayerEvent (final Player who)
 
final Player getPlayer ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.event.player.PlayerEvent
Player player
 

Detailed Description

Called when a player gets kicked from the server

Definition at line 10 of file PlayerKickEvent.java.

Member Function Documentation

String org.bukkit.event.player.PlayerKickEvent.getLeaveMessage ( )

Gets the leave message send to all online players

Returns
string kick reason

Definition at line 37 of file PlayerKickEvent.java.

37  {
38  return leaveMessage;
39  }
String org.bukkit.event.player.PlayerKickEvent.getReason ( )

Gets the reason why the player is getting kicked

Returns
string kick reason

Definition at line 28 of file PlayerKickEvent.java.

28  {
29  return kickReason;
30  }
boolean org.bukkit.event.player.PlayerKickEvent.isCancelled ( )

Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

Returns
true if this event is cancelled

Implements org.bukkit.event.Cancellable.

Definition at line 41 of file PlayerKickEvent.java.

41  {
42  return cancel;
43  }
void org.bukkit.event.player.PlayerKickEvent.setCancelled ( boolean  cancel)

Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Parameters
canceltrue if you wish to cancel this event

Implements org.bukkit.event.Cancellable.

Definition at line 45 of file PlayerKickEvent.java.

45  {
46  this.cancel = cancel;
47  }
void org.bukkit.event.player.PlayerKickEvent.setLeaveMessage ( String  leaveMessage)

Sets the leave message send to all online players

Parameters
leaveMessageleave message

Definition at line 63 of file PlayerKickEvent.java.

63  {
64  this.leaveMessage = leaveMessage;
65  }
void org.bukkit.event.player.PlayerKickEvent.setReason ( String  kickReason)

Sets the reason why the player is getting kicked

Parameters
kickReasonkick reason

Definition at line 54 of file PlayerKickEvent.java.

54  {
55  this.kickReason = kickReason;
56  }

The documentation for this class was generated from the following file: