From 5615fa7f325bb45762d13a704a9ffddda3efbfbb Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sun, 20 Nov 2022 23:39:55 -0500 Subject: 1.7.0 beta 5 --- .../java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/SetExitLocation.java') 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(); }); } -- cgit v1.2.3-freya