From 2a526291526811841d02ff813d9b3a7752570b43 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sun, 31 Oct 2021 11:25:27 -0400 Subject: 1.3.1 build 4 --- .../tylermurphy/hideAndSeek/command/SetLobbyLocation.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java') diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java index a8a1887..53ae721 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/SetLobbyLocation.java @@ -15,15 +15,19 @@ import static net.tylermurphy.hideAndSeek.configuration.Localization.*; public class SetLobbyLocation implements ICommand { public void execute(CommandSender sender, String[] args) { + if(!Main.plugin.status.equals("Standby")) { + sender.sendMessage(errorPrefix + message("GAME_INPROGRESS")); + return; + } Vector newLobbyPosition = new Vector(); Player player = (Player) sender; + if(player.getLocation().getBlockX() == 0 || player.getLocation().getBlockZ() == 0 || player.getLocation().getBlockY() == 0){ + sender.sendMessage(errorPrefix + message("NOT_AT_ZERO")); + return; + } newLobbyPosition.setX(player.getLocation().getBlockX()); newLobbyPosition.setY(player.getLocation().getBlockY()); newLobbyPosition.setZ(player.getLocation().getBlockZ()); - if(!Main.plugin.status.equals("Standby")) { - sender.sendMessage(errorPrefix + message("GAME_INPROGRESS")); - return; - } lobbyPosition = newLobbyPosition; sender.sendMessage(messagePrefix + message("LOBBY_SPAWN")); addToConfig("spawns.lobby.x", lobbyPosition.getX()); -- cgit v1.2.3-freya