summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCory Redmond <ace@ac3-servers.eu>2016-07-11 02:20:23 +0100
committermd_5 <git@md-5.net>2017-11-18 10:27:24 +1100
commit74cd5fdfc43cadbfd6b55de344fa67675e2437b1 (patch)
tree4b3c735564613befc398cacef069c29f6535f395
parent6e0b0a1b55a9c10f26ec46966bd5431eaa2a12b9 (diff)
downloadcraftbukkit-74cd5fdfc43cadbfd6b55de344fa67675e2437b1.tar
craftbukkit-74cd5fdfc43cadbfd6b55de344fa67675e2437b1.tar.gz
craftbukkit-74cd5fdfc43cadbfd6b55de344fa67675e2437b1.tar.lz
craftbukkit-74cd5fdfc43cadbfd6b55de344fa67675e2437b1.tar.xz
craftbukkit-74cd5fdfc43cadbfd6b55de344fa67675e2437b1.zip
Add setSpawnLocation(Location)
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 1941e3a2..8f6653f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -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();