
org.bukkit.event.world.SpawnChangeEvent Maven / Gradle / Ivy
package org.bukkit.event.world;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.event.HandlerList;
/**
* An event that is called when a world's spawn changes. The world's previous
* spawn location is included.
*/
public class SpawnChangeEvent extends WorldEvent {
private static final HandlerList handlers = new HandlerList();
private final Location previousLocation;
public SpawnChangeEvent(final World world, final Location previousLocation) {
super(world);
this.previousLocation = previousLocation;
}
public static HandlerList getHandlerList() {
return handlers;
}
/**
* Gets the previous spawn location
*
* @return Location that used to be spawn
*/
public Location getPreviousLocation() {
return previousLocation;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy