Add setSpawnLocation(Location)

By: Cory Redmond <ace@ac3-servers.eu>
This commit is contained in:
CraftBukkit/Spigot 2016-07-11 02:20:23 +01:00
parent 82913cc71b
commit a8a168aba4

View file

@ -112,6 +112,13 @@ public class CraftWorld implements World {
return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ());
}
@Override
public boolean setSpawnLocation(Location location) {
Preconditions.checkArgument(location != null, "location");
return equals(location.getWorld()) ? setSpawnLocation(location.getBlockX(), location.getBlockY(), location.getBlockZ()) : false;
}
public boolean setSpawnLocation(int x, int y, int z) {
try {
Location previousLocation = getSpawnLocation();