public class PlayerBanEvent extends PlayerEvent implements Cancellable
| Constructor and Description |
|---|
PlayerBanEvent(Player player,
java.lang.String sendername,
int duration,
java.lang.String reason) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDuration()
Gets the duration (minutes) how long the player will be banned.
|
java.lang.String |
getReason()
Gets the reason why the player will be banned.
|
java.lang.String |
getSenderName()
Gets the name of the player who wants to ban this player.
|
boolean |
isCancelled()
Determines if the event is cancelled.
|
void |
setCancelled(boolean cancel)
Cancels this event.
|
void |
setDuration(int duration)
Sets the duration (minutes) how long the player will be banned.
|
void |
setReason(java.lang.String reason)
Sets the reason why this player will be banned.
|
getPlayerpublic PlayerBanEvent(Player player, java.lang.String sendername, int duration, java.lang.String reason)
public java.lang.String getSenderName()
public void setDuration(int duration)
duration - the duration (minutes) how long the player will be banned.public int getDuration()
public void setReason(java.lang.String reason)
reason - the reason why the player will be banned.public java.lang.String getReason()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - set to true if you want to cancel this event.