summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java
index 93c0d8c..a616297 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java
@@ -28,9 +28,14 @@ import static net.tylermurphy.hideAndSeek.configuration.Config.*;
public class SetExitLocation implements ICommand {
public void execute(Player sender, String[] args) {
- LocationUtils.setLocation(sender, Locations.EXIT, vector -> {
+ LocationUtils.setLocation(sender, Locations.EXIT, args[0], map -> {
+ addToConfig("exit.x", sender.getLocation().getBlockX());
+ addToConfig("exit.y", sender.getLocation().getBlockY());
+ addToConfig("exit.z", sender.getLocation().getBlockZ());
+ addToConfig("exit.world", sender.getLocation().getWorld().getName());
+ exitPosition = sender.getLocation();
exitWorld = sender.getLocation().getWorld().getName();
- exitPosition = vector;
+ saveConfig();
});
}