summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java
index e8adf24..0a57cfc 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java
@@ -19,9 +19,10 @@
package net.tylermurphy.hideAndSeek.command;
-import net.tylermurphy.hideAndSeek.command.util.Command;
+import net.tylermurphy.hideAndSeek.command.util.ICommand;
import net.tylermurphy.hideAndSeek.command.location.LocationUtils;
import net.tylermurphy.hideAndSeek.command.location.Locations;
+import net.tylermurphy.hideAndSeek.util.Location;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
@@ -29,7 +30,7 @@ import java.util.List;
import static net.tylermurphy.hideAndSeek.configuration.Config.*;
-public class SetExitLocation extends Command {
+public class SetExitLocation implements ICommand {
public void execute(Player sender, String[] args) {
LocationUtils.setLocation(sender, Locations.EXIT, null, map -> {
@@ -37,8 +38,7 @@ public class SetExitLocation extends Command {
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 = Location.from(sender);
saveConfig();
});
}