Add setSpawnLocation(Location)
By: Cory Redmond <ace@ac3-servers.eu>
This commit is contained in:
parent
82913cc71b
commit
a8a168aba4
1 changed files with 7 additions and 0 deletions
|
@ -112,6 +112,13 @@ public class CraftWorld implements World {
|
||||||
return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ());
|
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) {
|
public boolean setSpawnLocation(int x, int y, int z) {
|
||||||
try {
|
try {
|
||||||
Location previousLocation = getSpawnLocation();
|
Location previousLocation = getSpawnLocation();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue