Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
PlayerJoinEvent.java
1 package org.bukkit.event.player;
2 
3 import org.bukkit.entity.Player;
5 
6 /**
7  * Called when a player joins a server
8  */
9 public class PlayerJoinEvent extends PlayerEvent {
10  private static final HandlerList handlers = new HandlerList();
11  private String joinMessage;
12 
13  public PlayerJoinEvent(final Player playerJoined, final String joinMessage) {
14  super(playerJoined);
15  this.joinMessage = joinMessage;
16  }
17 
18  /**
19  * Gets the join message to send to all online players
20  *
21  * @return string join message
22  */
23  public String getJoinMessage() {
24  return joinMessage;
25  }
26 
27  /**
28  * Sets the join message to send to all online players
29  *
30  * @param joinMessage join message
31  */
32  public void setJoinMessage(String joinMessage) {
33  this.joinMessage = joinMessage;
34  }
35 
36  @Override
37  public HandlerList getHandlers() {
38  return handlers;
39  }
40 
41  public static HandlerList getHandlerList() {
42  return handlers;
43  }
44 }