Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
PlayerChangedWorldEvent.java
1 package org.bukkit.event.player;
2 
3 import org.bukkit.World;
4 import org.bukkit.entity.Player;
6 
7 /**
8  * Called when a player switches to another world.
9  */
10 public class PlayerChangedWorldEvent extends PlayerEvent {
11  private static final HandlerList handlers = new HandlerList();
12  private final World from;
13 
14  public PlayerChangedWorldEvent(final Player player, final World from) {
15  super(player);
16  this.from = from;
17  }
18 
19  /**
20  * Gets the world the player is switching from.
21  *
22  * @return player's previous world
23  */
24  public World getFrom() {
25  return from;
26  }
27 
28  @Override
29  public HandlerList getHandlers() {
30  return handlers;
31  }
32 
33  public static HandlerList getHandlerList() {
34  return handlers;
35  }
36 }