Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
SpawnChangeEvent.java
1 package org.bukkit.event.world;
2 
3 import org.bukkit.World;
4 import org.bukkit.Location;
6 
7 /**
8  * An event that is called when a world's spawn changes. The world's previous
9  * spawn location is included.
10  */
11 public class SpawnChangeEvent extends WorldEvent {
12  private static final HandlerList handlers = new HandlerList();
13  private final Location previousLocation;
14 
15  public SpawnChangeEvent(final World world, final Location previousLocation) {
16  super(world);
17  this.previousLocation = previousLocation;
18  }
19 
20  /**
21  * Gets the previous spawn location
22  *
23  * @return Location that used to be spawn
24  */
26  return previousLocation;
27  }
28 
29  @Override
30  public HandlerList getHandlers() {
31  return handlers;
32  }
33 
34  public static HandlerList getHandlerList() {
35  return handlers;
36  }
37 }