mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
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());
|
||||
}
|
||||
|
||||
@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…
Add table
Reference in a new issue