mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 15:08:27 +02:00
Add setSpawnLocation(Location)
This commit is contained in:
parent
6e0b0a1b55
commit
74cd5fdfc4
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user