Add setSpawnLocation(Location)

Dieser Commit ist enthalten in:
Cory Redmond 2016-07-11 02:20:23 +01:00 committet von md_5
Ursprung 6e0b0a1b55
Commit 74cd5fdfc4

Datei anzeigen

@ -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();