This event includes the world who's spawn changed and its previous spawn location.
To listen for this event:
PluginManager pm = getServer().getPluginManager();
YourWorldListener worldListener = new YourWorldListener(this);
pm.registerEvent(Event.Type.SPAWN_CHANGE, worldListener, Priority.Normal, this);
To use this event:
public class YourWorldListener extends WorldListener {
@Override
public void onSpawnChange(SpawnChangeEvent event) {
World world = event.getWorld();
Location previousLocation = event.getPreviousLocation();
}
}
By: William Bowers <william.bowers@gmail.com>